public void UnitMenuAttack(Game_Unit unit, int targetId) { Global.game_map.clear_move_range(); // Lock in unit movement unit.moved(); // Skills: Trample if (unit.trample_activated) { unit.set_trample_loc(); } // Skills: Old Swoop //@Debug if (unit.old_swoop_activated) { Global.game_state.call_battle(unit.id, unit.enemies_in_old_swoop_range(unit.facing)[0]); sort_aoe_targets(unit.id); // Adds to list of attacked units for this turn foreach (int id in Global.game_system.Aoe_Targets) { if (Global.game_map.units.ContainsKey(id) && unit.is_attackable_team(Global.game_map.units[id])) { unit.add_attack_target(id); } } unit.same_target_support_gain_display(Global.game_system.Aoe_Targets); } else { Global.game_state.call_battle(unit.id, targetId); // Adds to list of attacked units for this turn if (Global.game_map.units.ContainsKey(targetId) && unit.is_attackable_team(Global.game_map.units[targetId])) { unit.add_attack_target(targetId); unit.same_target_support_gain_display(targetId); } } Global.game_temp.clear_temp_range(); Global.game_temp.menuing = false; close_unit_menu(true); }