除了充盈都做完了
This commit is contained in:
@@ -169,4 +169,49 @@ namespace Continentis.MainGame.Combat
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class CombatCharacterController
|
||||
{
|
||||
public List<CharacterBase> GetAllAllies(CharacterBase character, bool includeSelf = false)
|
||||
{
|
||||
if (character.fraction is Fraction.Player or Fraction.Ally)
|
||||
{
|
||||
List<CharacterBase> alliesList = new List<CharacterBase>(playerHeroes);
|
||||
alliesList.AddRange(npcs[Fraction.Ally]);
|
||||
|
||||
if (!includeSelf)
|
||||
{
|
||||
alliesList.Remove(character);
|
||||
}
|
||||
|
||||
return alliesList;
|
||||
}
|
||||
else
|
||||
{
|
||||
return npcs[character.fraction].Cast<CharacterBase>().ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public List<CharacterBase> GetAllEnemies(CharacterBase character)
|
||||
{
|
||||
if (character.fraction is Fraction.Player or Fraction.Ally)
|
||||
{
|
||||
return npcs[Fraction.Enemy].Cast<CharacterBase>().ToList();
|
||||
}
|
||||
else if (character.fraction is Fraction.Enemy)
|
||||
{
|
||||
List<CharacterBase> enemiesList = new List<CharacterBase>(playerHeroes);
|
||||
enemiesList.AddRange(npcs[Fraction.Ally]);
|
||||
return enemiesList;
|
||||
}
|
||||
else // Neutral
|
||||
{
|
||||
List<CharacterBase> enemiesList = new List<CharacterBase>();
|
||||
enemiesList.AddRange(npcs[Fraction.Player]);
|
||||
enemiesList.AddRange(npcs[Fraction.Ally]);
|
||||
enemiesList.AddRange(npcs[Fraction.Enemy]);
|
||||
return enemiesList;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user