Fixing how Vitality is calculated. Wounds on a character affect the vitality of that character (lowering it), rather than being treated like damage in Magic.
This commit is contained in:
@@ -94,7 +94,7 @@ public class PlayConditions {
|
||||
}
|
||||
|
||||
public static boolean canExert(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard card) {
|
||||
return (gameState.getWounds(card) < modifiersQuerying.getVitality(gameState, card) - 1);
|
||||
return (modifiersQuerying.getVitality(gameState, card) > 1);
|
||||
}
|
||||
|
||||
public static boolean winsSkirmish(EffectResult effectResult, PhysicalCard character) {
|
||||
|
||||
@@ -38,7 +38,7 @@ public class Card1_302 extends AbstractCompanion {
|
||||
@Override
|
||||
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, final LotroGame game, final PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self)
|
||||
&& game.getModifiersQuerying().getVitality(game.getGameState(), self) > 2 + game.getGameState().getWounds(self)
|
||||
&& game.getModifiersQuerying().getVitality(game.getGameState(), self) > 2
|
||||
&& !isAssigned(game, self)) {
|
||||
final DefaultCostToEffectAction action = new DefaultCostToEffectAction(self, Keyword.SKIRMISH, "Exert Merry twice to add his strength to another companion.");
|
||||
action.addCost(
|
||||
|
||||
@@ -167,7 +167,7 @@ public class Filters {
|
||||
return new Filter() {
|
||||
@Override
|
||||
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
|
||||
return (gameState.getWounds(physicalCard) < modifiersQuerying.getVitality(gameState, physicalCard) - 1);
|
||||
return (modifiersQuerying.getVitality(gameState, physicalCard) > 1);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ public class ModifiersLogic implements ModifiersEnvironment, ModifiersQuerying {
|
||||
|
||||
@Override
|
||||
public int getVitality(GameState gameState, PhysicalCard physicalCard) {
|
||||
int result = physicalCard.getBlueprint().getVitality();
|
||||
int result = physicalCard.getBlueprint().getVitality() - gameState.getWounds(physicalCard);
|
||||
for (Modifier modifier : getModifiers(ModifierEffect.VITALITY_MODIFIER)) {
|
||||
if (affectsCardWithSkipSet(gameState, physicalCard, modifier))
|
||||
result = modifier.getVitality(gameState, this, physicalCard, result);
|
||||
|
||||
@@ -35,7 +35,7 @@ public class CharacterDeathRule {
|
||||
List<PhysicalCard> characters = Filters.filterActive(gameState, game.getModifiersQuerying(),
|
||||
Filters.or(Filters.type(CardType.ALLY), Filters.type(CardType.COMPANION), Filters.type(CardType.MINION)));
|
||||
for (PhysicalCard character : characters)
|
||||
if (gameState.getWounds(character) >= game.getModifiersQuerying().getVitality(gameState, character))
|
||||
if (game.getModifiersQuerying().getVitality(gameState, character) <= 0)
|
||||
deadCharacters.add(character);
|
||||
|
||||
if (deadCharacters.size() > 0) {
|
||||
|
||||
Reference in New Issue
Block a user