public void DebugMenuLevelUpUnit(Game_Unit unit) { if (unit.actor.can_promote() && unit.actor.promotion_level() && unit.actor.level == unit.actor.level_cap()) { Global.game_system.play_se(System_Sounds.Status_Page_Change); unit.actor.exp = 0; unit.actor.quick_promotion((int)unit.actor.promotes_to(false)); unit.refresh_sprite(); unit.update_move_range(); } else if (unit.actor.exp_gain_possible() > 0) { Global.game_system.play_se(System_Sounds.Level_Up_Stat); unit.actor.instant_level = true; unit.actor.exp += Global.ActorConfig.ExpToLvl; } }
public void remove_siege_engine(int id) { if (this.siege_engines.ContainsKey(id)) { Siege_Engine siege = this.siege_engines[id]; Game_Unit unit = siege.Unit; Siege_Locations[(int)siege.loc.X, (int)siege.loc.Y] = 0; Objects.remove_siege_engine(id); if (get_scene_map() != null) { get_scene_map().remove_map_sprite(id); } if (unit != null) { unit.refresh_sprite(); } } }
public void UnitMenuReload(Game_Unit unit, Vector2 targetLoc) { //Global.game_state.call_reload( //@Debug // unit.id, // target_loc); // Simplified reload siege engine //@Debug var siege = Global.game_map.get_siege(targetLoc); siege.reload(); Game_Unit siegeUnit = siege.Unit; if (siegeUnit != null) { siegeUnit.refresh_sprite(); } EndConstruct(unit); }