1
This commit is contained in:
parent
ab77a051d6
commit
b92d5ccd8c
@ -497,6 +497,9 @@ float BattleDataContext::CalcDmg(Creature* target, Bullet* bullet)
|
|||||||
float crit = IsCrit(bullet) ? GetCritRate(bullet) : 0;
|
float crit = IsCrit(bullet) ? GetCritRate(bullet) : 0;
|
||||||
float dodge = IsDodge(bullet) ? GetDodgeRuduce(bullet) : 0;
|
float dodge = IsDodge(bullet) ? GetDodgeRuduce(bullet) : 0;
|
||||||
float finaly_dmg = normal_dmg * (1.0f + crit + dodge);
|
float finaly_dmg = normal_dmg * (1.0f + crit + dodge);
|
||||||
|
#if 1
|
||||||
|
finaly_dmg *= (1 + bullet->strengthen_wall);
|
||||||
|
#endif
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (owner_.Get()->IsPlayer()) {
|
if (owner_.Get()->IsPlayer()) {
|
||||||
std::string data = a8::Format
|
std::string data = a8::Format
|
||||||
|
@ -798,7 +798,26 @@ void Bullet::OnKillTarget(Entity* target)
|
|||||||
|
|
||||||
void Bullet::OnStrengthen(Obstacle* ob)
|
void Bullet::OnStrengthen(Obstacle* ob)
|
||||||
{
|
{
|
||||||
|
if (ob->IsRoomObstacle()) {
|
||||||
|
RoomObstacle* room_ob = ob->AsRoomObstacle();
|
||||||
|
if (room_ob->skill_meta) {
|
||||||
|
MetaData::Skill* skill_meta = room_ob->skill_meta;
|
||||||
|
if (skill_meta && skill_meta->number_meta) {
|
||||||
|
switch (skill_meta->GetMagicId()) {
|
||||||
|
case MAGIC_WLFB:
|
||||||
|
{
|
||||||
|
strengthen_wall = skill_meta->number_meta->float_ratio2;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Bullet::ClearBuffList()
|
void Bullet::ClearBuffList()
|
||||||
|
@ -33,7 +33,7 @@ class Bullet : public MoveableEntity
|
|||||||
float fly_distance = 0.0f;
|
float fly_distance = 0.0f;
|
||||||
MovementComponent* movement = nullptr;
|
MovementComponent* movement = nullptr;
|
||||||
int trace_target_id = 0;
|
int trace_target_id = 0;
|
||||||
int strengthen_wall = 0;
|
float strengthen_wall = 0;
|
||||||
int hand = 0;
|
int hand = 0;
|
||||||
std::weak_ptr<a8::XTimerPtr> keep_shot_animi_timer_ptr;
|
std::weak_ptr<a8::XTimerPtr> keep_shot_animi_timer_ptr;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user