This commit is contained in:
aozhiwei 2022-10-09 14:27:00 +08:00
parent ab77a051d6
commit b92d5ccd8c
3 changed files with 23 additions and 1 deletions

View File

@ -497,6 +497,9 @@ float BattleDataContext::CalcDmg(Creature* target, Bullet* bullet)
float crit = IsCrit(bullet) ? GetCritRate(bullet) : 0;
float dodge = IsDodge(bullet) ? GetDodgeRuduce(bullet) : 0;
float finaly_dmg = normal_dmg * (1.0f + crit + dodge);
#if 1
finaly_dmg *= (1 + bullet->strengthen_wall);
#endif
#ifdef DEBUG
if (owner_.Get()->IsPlayer()) {
std::string data = a8::Format

View File

@ -797,9 +797,28 @@ void Bullet::OnKillTarget(Entity* target)
}
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()
{

View File

@ -33,7 +33,7 @@ class Bullet : public MoveableEntity
float fly_distance = 0.0f;
MovementComponent* movement = nullptr;
int trace_target_id = 0;
int strengthen_wall = 0;
float strengthen_wall = 0;
int hand = 0;
std::weak_ptr<a8::XTimerPtr> keep_shot_animi_timer_ptr;