public void UnitEditorUnitMenuCopyUnit() { Game_Unit unit = Global.game_map.units[Global.game_system.Selected_Unit_Id]; Global.test_battler_1 = Test_Battle_Character_Data.from_data( _unitData.Units[unit.loc].type, _unitData.Units[unit.loc].identifier, _unitData.Units[unit.loc].data); if (Global.test_battler_1.Generic) { Global.test_battler_1.Actor_Id = Global.game_actors.next_actor_id(); } Global.game_temp.menuing = false; close_map_menu(); Global.game_system.Selected_Unit_Id = -1; Global.game_map.move_range_visible = true; Global.game_map.highlight_test(); }
public void UnitEditorUnitMenuChangeTeam(bool increment) { Game_Unit unit = Global.game_map.units[Global.game_system.Selected_Unit_Id]; int team = unit.team; team = new_team(team, !increment); Global.game_map.change_unit_team(unit.id, team); Global.game_map.refresh_move_ranges(); Global.game_map.wait_for_move_update(); Global.test_battler_1 = Test_Battle_Character_Data.from_data( _unitData.Units[unit.loc].type, _unitData.Units[unit.loc].identifier, _unitData.Units[unit.loc].data); string[] ary = Global.test_battler_1.to_string(unit.team); _unitData.Units[Global.player.loc] = new Data_Unit(ary[0], ary[1], ary[2]); }