mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 07:22:03 -08:00
[LCI] Implement Ojer Axonil, Deepest Might (#11195)
* [LCI] Implement Ojer Axonil, Deepest Might * add tests * Alter text generation on ActivateIfConditionActivatedAbility to handle "and as a sorcery"
This commit is contained in:
parent
287e25b28f
commit
8e1ef15b70
7 changed files with 521 additions and 13 deletions
|
|
@ -6,6 +6,7 @@ import mage.abilities.condition.Condition;
|
|||
import mage.abilities.condition.InvertCondition;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.TimingRule;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
|
||||
|
|
@ -13,10 +14,14 @@ import mage.game.Game;
|
|||
* @author LevelX2
|
||||
*/
|
||||
public class ActivateIfConditionActivatedAbility extends ActivatedAbilityImpl {
|
||||
|
||||
public ActivateIfConditionActivatedAbility(Zone zone, Effect effect, Cost cost, Condition condition) {
|
||||
this(zone, effect, cost, condition, TimingRule.INSTANT);
|
||||
}
|
||||
|
||||
public ActivateIfConditionActivatedAbility(Zone zone, Effect effect, Cost cost, Condition condition, TimingRule timing) {
|
||||
super(zone, effect, cost);
|
||||
this.condition = condition;
|
||||
this.timing = timing;
|
||||
}
|
||||
|
||||
protected ActivateIfConditionActivatedAbility(final ActivateIfConditionActivatedAbility ability) {
|
||||
|
|
@ -41,7 +46,11 @@ public class ActivateIfConditionActivatedAbility extends ActivatedAbilityImpl {
|
|||
&& !condition.toString().startsWith("if")) {
|
||||
sb.append("if ");
|
||||
}
|
||||
sb.append(condition.toString()).append('.');
|
||||
sb.append(condition.toString());
|
||||
if (timing == TimingRule.SORCERY) {
|
||||
sb.append(" and only as a sorcery");
|
||||
}
|
||||
sb.append('.');
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue