mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Renown - Fixed that the check if the creature is already renown was not implemted as intervening if clause.
This commit is contained in:
parent
72408a7f52
commit
26e03d6c0f
1 changed files with 6 additions and 1 deletions
|
@ -48,6 +48,11 @@ public class RenownAbility extends TriggeredAbilityImpl {
|
|||
return event.getType() == GameEvent.EventType.DAMAGED_PLAYER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkInterveningIfClause(Game game) {
|
||||
return getSourceObject(game) != null && !((Permanent)getSourceObject(game)).isRenown();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return event.getSourceId().equals(getSourceId())
|
||||
|
@ -83,7 +88,7 @@ class BecomeRenownSourceEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null && !permanent.isRenown() && source instanceof RenownAbility) {
|
||||
if (permanent != null && source instanceof RenownAbility) {
|
||||
game.informPlayers(permanent.getLogName() + " is now renown");
|
||||
int renownValue = ((RenownAbility) source).getRenownValue();
|
||||
// handle renown = X
|
||||
|
|
Loading…
Reference in a new issue