mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-13 17:27:46 +00:00
AI hint for Transcendence (#5088)
* - Add OTJ achievements by Marek14. * - AI hint for Transcendence.
This commit is contained in:
@@ -264,11 +264,21 @@ public class PermanentAi extends SpellAbilityAi {
|
|||||||
if (ai.getLife() < Integer.parseInt(value)) {
|
if (ai.getLife() < Integer.parseInt(value)) {
|
||||||
dontCast = true;
|
dontCast = true;
|
||||||
}
|
}
|
||||||
|
} else if (param.equals("NeverCastIfLifeAbove")) {
|
||||||
|
// Do not cast this spell if AI life is below a certain threshold
|
||||||
|
if (ai.getLife() > Integer.parseInt(value)) {
|
||||||
|
dontCast = true;
|
||||||
|
}
|
||||||
} else if (param.equals("AlwaysCastIfLifeBelow")) {
|
} else if (param.equals("AlwaysCastIfLifeBelow")) {
|
||||||
if (ai.getLife() < Integer.parseInt(value)) {
|
if (ai.getLife() < Integer.parseInt(value)) {
|
||||||
dontCast = false;
|
dontCast = false;
|
||||||
break; // disregard other preferences, always cast as a last resort
|
break; // disregard other preferences, always cast as a last resort
|
||||||
}
|
}
|
||||||
|
} else if (param.equals("AlwaysCastIfLifeAbove")) {
|
||||||
|
if (ai.getLife() > Integer.parseInt(value)) {
|
||||||
|
dontCast = false;
|
||||||
|
break; // disregard other preferences, always cast as a last resort
|
||||||
|
}
|
||||||
} else if (param.equals("OnlyFromZone")) {
|
} else if (param.equals("OnlyFromZone")) {
|
||||||
if (!source.getZone().getZoneType().toString().equals(value)) {
|
if (!source.getZone().getZoneType().toString().equals(value)) {
|
||||||
dontCast = true;
|
dontCast = true;
|
||||||
|
|||||||
@@ -7,5 +7,6 @@ T:Mode$ LifeLost | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigL
|
|||||||
SVar:TrigLoseGame:DB$ LosesGame | Defined$ You
|
SVar:TrigLoseGame:DB$ LosesGame | Defined$ You
|
||||||
SVar:TrigLifeGain:DB$ GainLife | LifeAmount$ X
|
SVar:TrigLifeGain:DB$ GainLife | LifeAmount$ X
|
||||||
SVar:X:TriggerCount$LifeAmount/Times.2
|
SVar:X:TriggerCount$LifeAmount/Times.2
|
||||||
|
SVar:AICastPreference:NeverCastIfLifeAbove$ 5
|
||||||
AI:RemoveDeck:Random
|
AI:RemoveDeck:Random
|
||||||
Oracle:You don't lose the game for having 0 or less life.\nWhen you have 20 or more life, you lose the game.\nWhenever you lose life, you gain 2 life for each 1 life you lost. (Damage dealt to you causes you to lose life.)
|
Oracle:You don't lose the game for having 0 or less life.\nWhen you have 20 or more life, you lose the game.\nWhenever you lose life, you gain 2 life for each 1 life you lost. (Damage dealt to you causes you to lose life.)
|
||||||
|
|||||||
Reference in New Issue
Block a user