public static List<BattleAction> getBattleActionList(EnemyCharacter character, BattleGame game) { List<BattleAction> retvalList = character.aiActor.getBattleActionList(game); if (retvalList.Count == 0) { retvalList.Add(getEndTurnAction(character)); } return retvalList; }
public static List <BattleAction> getBattleActionList(EnemyCharacter character, BattleGame game) { List <BattleAction> retvalList = character.aiActor.getBattleActionList(game); if (retvalList.Count == 0) { retvalList.Add(getEndTurnAction(character)); } return(retvalList); }
private static EnemyCharacter getEnemyFromGameCharacter(GameCharacter gameChar, EnemyType enemyType) { EnemyCharacter enemyChar = new EnemyCharacter(enemyType) { abilityList = gameChar.abilityList, ac = gameChar.ac, activeEffects = gameChar.activeEffects, Ammo = gameChar.Ammo, ap = gameChar.ap, attack = gameChar.attack, characterSpriteIndex = gameChar.characterSpriteIndex, characterSpritesheetName = gameChar.characterSpritesheetName, displayChar = gameChar.displayChar, enemyType = enemyType, equippedArmor = gameChar.equippedArmor, hp = gameChar.hp, inventory = gameChar.inventory, name = gameChar.name, passiveEffects = gameChar.passiveEffects, portraitSpriteIndex = gameChar.portraitSpriteIndex, portraitSpritesheetName = gameChar.portraitSpritesheetName, totalAP = gameChar.totalAP, totalHP = gameChar.totalHP, type = CharacterType.Enemy, weapon = gameChar.weapon, x = gameChar.x, y = gameChar.y, strength = gameChar.strength, agility = gameChar.agility, endurance = gameChar.endurance, spirit = gameChar.spirit }; return enemyChar; }
private static BattleAction getEndTurnAction(EnemyCharacter character) { return new BattleAction() { AP=0, actionType = BattleActionType.EndTurn, character = character, targetCharacter = null, targetTile = null }; }