#include "precompile.h" #include "frag_mitask.h" #include "room.h" #include "player.h" #include "gridservice.h" #include "creature.h" #include "obstacle.h" #include "explosion.h" #include "entityfactory.h" #include "mt/Equip.h" void FragMiTask::Done() { Position center = bomb_pos; if (follow_target.Get()) { bomb_pos = follow_target.Get()->GetPos(); center = bomb_pos; } std::shared_ptr explosion = EntityFactory::Instance()->MakeExplosion(); if (force_target.Get()) { explosion->AddForceTarget(force_target); } explosion->bullet_uniid = bullet_uniid; explosion->EnemyAndObstacleAttack(sender, center, explosion_range, gun_meta->explosion_effect(), GetAtk()); }