mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- Added Personal Incarnation
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -8097,6 +8097,7 @@ res/cardsfolder/p/permafrost_trap.txt svneol=native#text/plain
|
||||
res/cardsfolder/p/pernicious_deed.txt svneol=native#text/plain
|
||||
res/cardsfolder/p/perplex.txt -text
|
||||
res/cardsfolder/p/persecute.txt -text
|
||||
res/cardsfolder/p/personal_incarnation.txt -text
|
||||
res/cardsfolder/p/personal_sanctuary.txt -text
|
||||
res/cardsfolder/p/personal_tutor.txt svneol=native#text/plain
|
||||
res/cardsfolder/p/persuasion.txt svneol=native#text/plain
|
||||
|
||||
22
res/cardsfolder/p/personal_incarnation.txt
Normal file
22
res/cardsfolder/p/personal_incarnation.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
Name:Personal Incarnation
|
||||
ManaCost:3 W W W
|
||||
Types:Creature Avatar Incarnation
|
||||
PT:6/6
|
||||
A:AB$ Effect | Cost$ 0 | Name$ Personal Incarnation Redirection | ReplacementEffects$ PersonalCombat,PersonalNonCombat | OwnerOnly$ True | SVars$ CombatDmg,NonCombatDmg,ExileEffect,RestDmgCombat,RestDmg,X,Y | References$ PersonalCombat,PersonalNonCombat,CombatDmg,NonCombatDmg,ExileEffect,RestDmgCombat,RestDmg,X,Y | Duration$ HostLeavesOrEOT | RememberObjects$ Self | EffectOwner$ CardOwner | SpellDescription$ The next 1 damage that would be dealt to CARDNAME this turn is dealt to its owner instead. Any player may activate this ability, but only if he or she owns CARDNAME.
|
||||
SVar:PersonalCombat:Event$ DamageDone | ValidTarget$ Card.IsRemembered | IsCombat$ True | ReplaceWith$ CombatDmg | Description$ The next 1 damage that would be dealt to Personal Incarnation this turn is dealt to its owner instead.
|
||||
SVar:PersonalNonCombat:Event$ DamageDone | ValidTarget$ Card.IsRemembered | IsCombat$ False | ReplaceWith$ NonCombatDmg | Secondary$ True | Description$ The next 1 damage that would be dealt to Personal Incarnation this turn is dealt to its owner instead.
|
||||
SVar:CombatDmg:AB$ DealDamage | Cost$ 0 | Defined$ You | DamageSource$ ReplacedSource | CombatDamage$ True | NumDmg$ 1 | SubAbility$ RestDmgCombat | ConditionCheckSVar$ Y | ConditionSVarCompare$ GE1 | References$ Y
|
||||
SVar:NonCombatDmg:AB$ DealDamage | Cost$ 0 | Defined$ You | DamageSource$ ReplacedSource | NumDmg$ 1 | SubAbility$ RestDmg | ConditionCheckSVar$ Y | ConditionSVarCompare$ GE1 | References$ Y
|
||||
SVar:RestDmgCombat:DB$ DealDamage | Defined$ Remembered | DamageSource$ ReplacedSource | CombatDamage$ True | NumDmg$ X | SubAbility$ ExileEffect | References$ X
|
||||
SVar:RestDmg:DB$ DealDamage | Defined$ Remembered | DamageSource$ ReplacedSource | NumDmg$ X | SubAbility$ ExileEffect | References$ X
|
||||
SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile | Static$ True
|
||||
SVar:X:ReplaceCount$DamageAmount/Minus.1
|
||||
SVar:Y:ReplaceCount$DamageAmount
|
||||
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigLoseLife | TriggerController$ TriggeredCardController | TriggerDescription$ When CARDNAME dies, its owner loses half his or her life, rounded up.
|
||||
SVar:TrigLoseLife:AB$ Pump | Cost$ 0 | RememberObjects$ TriggeredCardOwner | SubAbility$ DBLoseLife
|
||||
SVar:DBLoseLife:DB$ LoseLife | Defined$ Remembered | LifeAmount$ HavocX | References$ HavocX | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:HavocX:PlayerCountRemembered$LifeTotal/HalfUp
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/personal_incarnation.jpg
|
||||
Oracle:{0}: The next 1 damage that would be dealt to Personal Incarnation this turn is dealt to its owner instead. Any player may activate this ability, but only if he or she owns Personal Incarnation.\nWhen Personal Incarnation dies, its owner loses half his or her life, rounded up.
|
||||
@@ -121,6 +121,10 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
|
||||
this.setOpponentOnly(true);
|
||||
}
|
||||
|
||||
if (params.containsKey("OwnerOnly")) {
|
||||
this.setOwnerOnly(true);
|
||||
}
|
||||
|
||||
if (params.containsKey("ActivationLimit")) {
|
||||
this.setLimitToCheck(params.get("ActivationLimit"));
|
||||
}
|
||||
@@ -274,9 +278,14 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this.isOwnerOnly()) {
|
||||
return activator.equals(c.getOwner());
|
||||
}
|
||||
|
||||
if (activator.equals(c.getController()) && !this.isOpponentOnly()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!activator.equals(c.getController())
|
||||
&& (this.isOpponentOnly() || c.hasKeyword("May be played by your opponent"))) {
|
||||
return true;
|
||||
|
||||
@@ -58,7 +58,8 @@ public class SpellAbilityVariables {
|
||||
this.sorcerySpeed = sav.isSorcerySpeed();
|
||||
this.instantSpeed = sav.isInstantSpeed();
|
||||
this.anyPlayer = sav.isAnyPlayer();
|
||||
this.setOpponentOnly(sav.isAnyPlayer());
|
||||
this.opponentOnly = sav.isOpponentOnly();
|
||||
this.ownerOnly = sav.isOwnerOnly();
|
||||
this.opponentTurn = sav.isOpponentTurn();
|
||||
this.playerTurn = sav.isPlayerTurn();
|
||||
this.activationLimit = sav.getActivationLimit();
|
||||
@@ -104,9 +105,12 @@ public class SpellAbilityVariables {
|
||||
/** The b any player. */
|
||||
private boolean anyPlayer = false;
|
||||
|
||||
/** The b any player. */
|
||||
/** The b opponent only. */
|
||||
private boolean opponentOnly = false;
|
||||
|
||||
/** The b owner only. */
|
||||
private boolean ownerOnly = false;
|
||||
|
||||
/** The b opponent turn. */
|
||||
private boolean opponentTurn = false;
|
||||
|
||||
@@ -992,6 +996,19 @@ public class SpellAbilityVariables {
|
||||
this.opponentOnly = opponentOnly;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the ownerOnly
|
||||
*/
|
||||
public boolean isOwnerOnly() {
|
||||
return ownerOnly;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ownerOnly the ownerOnly to set
|
||||
*/
|
||||
public void setOwnerOnly(boolean ownerOnly) {
|
||||
this.ownerOnly = ownerOnly;
|
||||
}
|
||||
/**
|
||||
* <p>
|
||||
* Setter for the field <code>ColorToCheck</code>.
|
||||
|
||||
Reference in New Issue
Block a user