16 lines
No EOL
570 B
C#
16 lines
No EOL
570 B
C#
using System.Collections.Generic;
|
|
|
|
public class DamageTrigger : Trigger {
|
|
|
|
private List<BattleParticipant> observedParticipants;
|
|
|
|
public DamageTrigger(List<BattleParticipant> observedParticipants, TriggeredEffect callback,
|
|
TriggerExpiration expiration, TriggerRepetition repetition)
|
|
: base(callback, expiration, repetition) {
|
|
this.observedParticipants = observedParticipants;
|
|
}
|
|
|
|
public bool IsTriggeredBy(DealDamageEffect effect) {
|
|
return effect.Amount > 0 && this.observedParticipants.Contains(effect.Target);
|
|
}
|
|
} |