mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Attempting to fix Dragon Presence cards, part 1: "dragon presence" apparently cares about the current battlefield state, not the LKI (from Gatherer: "you must control a Dragon as you are finished casting the spell to get the bonus. For example, if you lose control of your only Dragon while casting the spell (because, for example, you sacrificed it to activate a mana ability), you won’t get the bonus"). Also fixes Orator Ojutai not drawing a card at all when a Dragon is present on the battlefield.
This commit is contained in:
@@ -229,7 +229,7 @@ public abstract class CardTraitBase extends GameObject implements IHasCardView {
|
|||||||
final String type = params.get("Presence");
|
final String type = params.get("Presence");
|
||||||
|
|
||||||
int revealed = AbilityUtils.calculateAmount(hostCard, "Revealed$Valid " + type, hostCard.getCastSA());
|
int revealed = AbilityUtils.calculateAmount(hostCard, "Revealed$Valid " + type, hostCard.getCastSA());
|
||||||
int ctrl = AbilityUtils.calculateAmount(hostCard, "Count$LastStateBattlefield " + type + ".YouCtrl", hostCard.getCastSA());
|
int ctrl = AbilityUtils.calculateAmount(hostCard, "Count$Valid " + type + ".inZoneBattlefield+YouCtrl", hostCard.getCastSA());
|
||||||
|
|
||||||
if (revealed + ctrl == 0) {
|
if (revealed + ctrl == 0) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -1307,7 +1307,7 @@ public class CardFactoryUtil {
|
|||||||
|
|
||||||
if (c.getCastFrom() != null && c.getCastSA() != null) {
|
if (c.getCastFrom() != null && c.getCastSA() != null) {
|
||||||
int revealed = AbilityUtils.calculateAmount(c, "Revealed$Valid " + type, c.getCastSA());
|
int revealed = AbilityUtils.calculateAmount(c, "Revealed$Valid " + type, c.getCastSA());
|
||||||
int ctrl = AbilityUtils.calculateAmount(c, "Count$LastStateBattlefield " + type + ".YouCtrl", c.getCastSA());
|
int ctrl = AbilityUtils.calculateAmount(c, "Count$Valid " + type + ".inZoneBattlefield+YouCtrl", c.getCastSA());
|
||||||
if (revealed + ctrl >= 1) {
|
if (revealed + ctrl >= 1) {
|
||||||
return doXMath(StringUtils.isNumeric(sq[1]) ? Integer.parseInt(sq[1]) : xCount(c, c.getSVar(sq[1])), m, c);
|
return doXMath(StringUtils.isNumeric(sq[1]) ? Integer.parseInt(sq[1]) : xCount(c, c.getSVar(sq[1])), m, c);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ public class SpellAbilityCondition extends SpellAbilityVariables {
|
|||||||
final String type = this.getPresenceCondition();
|
final String type = this.getPresenceCondition();
|
||||||
|
|
||||||
int revealed = AbilityUtils.calculateAmount(host, "Revealed$Valid " + type, host.getCastSA());
|
int revealed = AbilityUtils.calculateAmount(host, "Revealed$Valid " + type, host.getCastSA());
|
||||||
int ctrl = AbilityUtils.calculateAmount(host, "Count$LastStateBattlefield " + type + ".YouCtrl", host.getCastSA());
|
int ctrl = AbilityUtils.calculateAmount(host, "Count$Valid " + type + ".inZoneBattlefield+YouCtrl", host.getCastSA());
|
||||||
|
|
||||||
if (revealed + ctrl == 0) {
|
if (revealed + ctrl == 0) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -586,7 +586,7 @@ public class StaticAbility extends CardTraitBase implements Comparable<StaticAbi
|
|||||||
final String type = getParam("Presence");
|
final String type = getParam("Presence");
|
||||||
|
|
||||||
int revealed = AbilityUtils.calculateAmount(hostCard, "Revealed$Valid " + type, hostCard.getCastSA());
|
int revealed = AbilityUtils.calculateAmount(hostCard, "Revealed$Valid " + type, hostCard.getCastSA());
|
||||||
int ctrl = AbilityUtils.calculateAmount(hostCard, "Count$LastStateBattlefield " + type + ".YouCtrl", hostCard.getCastSA());
|
int ctrl = AbilityUtils.calculateAmount(hostCard, "Count$Valid " + type + ".inZoneBattlefield+YouCtrl", hostCard.getCastSA());
|
||||||
|
|
||||||
if (revealed + ctrl == 0) {
|
if (revealed + ctrl == 0) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ PT:0/4
|
|||||||
K:Presence:Dragon
|
K:Presence:Dragon
|
||||||
K:Defender
|
K:Defender
|
||||||
K:Flying
|
K:Flying
|
||||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Presence$ Dragon | Execute$ TrigKicker | TriggerDescription$ When CARDNAME enters the battlefield, if you revealed a Dragon card or controlled a Dragon as you cast CARDNAME, draw a card.
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigKicker | Presence$ Dragon | TriggerDescription$ When CARDNAME enters the battlefield, if you revealed a Dragon card or controlled a Dragon as you cast CARDNAME, draw a card.
|
||||||
SVar:TrigKicker:DB$ Draw | Defined$ You | NumCards$ 1
|
SVar:TrigKicker:DB$ Draw | Defined$ You | NumCards$ 1
|
||||||
DeckHints:Type$Dragon
|
DeckHints:Type$Dragon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/orator_of_ojutai.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/orator_of_ojutai.jpg
|
||||||
|
|||||||
Reference in New Issue
Block a user