mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- Added the keyword "Whenever CARDNAME deals damage, you gain that much life.".
- Converted some of the lifelink abilities to it. - Added Noble Purpose.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -3229,6 +3229,7 @@ res/cardsfolder/no_mercy.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/nobilis_of_war.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/noble_hierarch.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/noble_panther.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/noble_purpose.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/noble_steeds.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/noble_templar.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/nocturnal_raid.txt -text svneol=native#text/plain
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:1 B B
|
||||
Types:Creature Human Wizard
|
||||
Text:no text
|
||||
PT:1/1
|
||||
K:Lifelink
|
||||
K:Whenever CARDNAME deals damage, you gain that much life.
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/el_hajjaj.jpg
|
||||
SetInfo:3ED|Rare|http://magiccards.info/scans/en/rv/16.jpg
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Creature Angel
|
||||
Text:no text
|
||||
PT:4/5
|
||||
K:Flying
|
||||
K:Lifelink
|
||||
K:Whenever Exalted Angel deals damage, you gain that much life.
|
||||
K:Morph:2 W W
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/exalted_angel.jpg
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:2 G W
|
||||
Types:Creature Cat
|
||||
Text:no text
|
||||
PT:2/2
|
||||
K:Lifelink
|
||||
K:Whenever CARDNAME deals damage, you gain that much life.
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/horned_cheetah.jpg
|
||||
SetInfo:INV|Uncommon|http://magiccards.info/scans/en/in/251.jpg
|
||||
|
||||
@@ -5,7 +5,7 @@ Text:no text
|
||||
PT:3/3
|
||||
K:Flying
|
||||
K:First Strike
|
||||
K:Lifelink
|
||||
K:Whenever CARDNAME deals damage, you gain that much life.
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/kjeldoran_gargoyle.jpg
|
||||
SetInfo:CSP|Uncommon|http://magiccards.info/scans/en/cs/10.jpg
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Creature Thrull
|
||||
Text:no text
|
||||
PT:1/1
|
||||
K:Flying
|
||||
K:Lifelink
|
||||
K:Whenever CARDNAME deals damage, you gain that much life.
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/mourning_thrull.jpg
|
||||
SetInfo:GPT|Common|http://magiccards.info/scans/en/gp/146.jpg
|
||||
|
||||
8
res/cardsfolder/noble_purpose.txt
Normal file
8
res/cardsfolder/noble_purpose.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
Name:Noble Purpose
|
||||
ManaCost:3 W W
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
K:stPumpAll:Creature.YouCtrl:0/0/HIDDEN Whenever CARDNAME deals damage, you gain that much life.:No Condition:Whenever a creature you control deals combat damage, you gain that much life.
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/noble_purpose.jpg
|
||||
End
|
||||
@@ -1,8 +1,8 @@
|
||||
Name:Rite of Passage
|
||||
ManaCost:2 G
|
||||
Name:Noble Purpose
|
||||
ManaCost:3 W W
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
K:stPumpAll:Creature.YouCtrl:0/0/HIDDEN Whenever CARDNAME is dealt damage, put a +1/+1 counter on it.:No Condition:Whenever a creature you control is dealt damage, put a +1/+1 counter on it. (The damage is dealt before the counter is put on.)
|
||||
K:stPumpAll:Creature.YouCtrl:0/0/HIDDEN Whenever CARDNAME deals damage, you gain that much life.:No Condition:Whenever a creature you control is dealt damage, put a +1/+1 counter on it. (The damage is dealt before the counter is put on.)
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/rite_of_passage.jpg
|
||||
End
|
||||
|
||||
@@ -2853,24 +2853,22 @@ public class Card extends MyObservable {
|
||||
System.out.println("Adding " + damageToAdd + " damage to " + getName());
|
||||
Log.debug("Adding " + damageToAdd + " damage to " + getName());
|
||||
|
||||
if(source.getKeyword().contains("Lifelink")) GameActionUtil.executeLifeLinkEffects(source, damageToAdd);
|
||||
GameActionUtil.executeDamageDealingEffects(source, this, damageToAdd);
|
||||
|
||||
CardList cl = CardFactoryUtil.getAurasEnchanting(source, "Guilty Conscience");
|
||||
for(Card c:cl) {
|
||||
GameActionUtil.executeGuiltyConscienceEffects(source, c, damageToAdd);
|
||||
if(this.isPlaneswalker()) {
|
||||
this.subtractCounter(Counters.LOYALTY, damageToAdd);
|
||||
return;
|
||||
}
|
||||
|
||||
GameActionUtil.executeDamageToCreatureEffects(source, this, damageToAdd);
|
||||
|
||||
if((source.getKeyword().contains("Wither") || source.getKeyword().contains("Infect")) && this.isCreature()) {
|
||||
this.addCounterFromNonEffect(Counters.M1M1, damageToAdd);
|
||||
damageToAdd = 0;
|
||||
}
|
||||
|
||||
if(this.isPlaneswalker()) {
|
||||
this.subtractCounter(Counters.LOYALTY, damageToAdd);
|
||||
} else
|
||||
if(AllZoneUtil.isCardInPlay(this)) damage += damageToAdd;
|
||||
|
||||
GameActionUtil.executeCreatureDamageEffects(source, this, damageToAdd);
|
||||
}
|
||||
private ArrayList<SetInfo> Sets = new ArrayList<SetInfo>();
|
||||
private String curSetCode = "";
|
||||
|
||||
@@ -5333,8 +5333,39 @@ public class GameActionUtil {
|
||||
AllZone.Stack.add(ability2);
|
||||
}
|
||||
|
||||
//not restricted to combat damage
|
||||
public static void executeCreatureDamageEffects(final Card source, final Card affected, int damage) {
|
||||
//not restricted to combat damage, not restricted to dealing damage to creatures
|
||||
public static void executeDamageDealingEffects(final Card source, final Card affected, int damage) {
|
||||
|
||||
final Player player = affected.getController();
|
||||
|
||||
if(source.getKeyword().contains("Lifelink")) GameActionUtil.executeLifeLinkEffects(source, damage);
|
||||
|
||||
if(source.getKeyword().contains("Whenever CARDNAME deals damage, you gain that much life.")) {
|
||||
final int life = damage;
|
||||
|
||||
Ability ability = new Ability(source, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
player.gainLife(life, affected);
|
||||
}
|
||||
};
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(source.getName()+" - ").append(player).append(" gains ").append(life).append(" life");
|
||||
ability.setStackDescription(sb.toString());
|
||||
int amount = affected.getAmountOfKeyword("Whenever CARDNAME deals damage, you gain that much life.");
|
||||
|
||||
for(int i=0 ; i < amount ; i++)
|
||||
AllZone.Stack.add(ability);
|
||||
}
|
||||
|
||||
CardList cl = CardFactoryUtil.getAurasEnchanting(source, "Guilty Conscience");
|
||||
for(Card c:cl) {
|
||||
GameActionUtil.executeGuiltyConscienceEffects(source, c, damage);
|
||||
}
|
||||
}
|
||||
|
||||
//not restricted to combat damage, restricted to dealing damage to creatures
|
||||
public static void executeDamageToCreatureEffects(final Card source, final Card affected, int damage) {
|
||||
|
||||
final Player player = affected.getController();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user