Merge pull request #11178 from ssk97/MorphRework_v2

Morph rework and check spell characteristics
This commit is contained in:
xenohedron 2023-10-02 23:01:40 -04:00 committed by GitHub
commit 9456650693
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
283 changed files with 905 additions and 649 deletions

View file

@ -328,8 +328,17 @@ public class SpellAbility extends ActivatedAbilityImpl {
return spellCharacteristics;
}
/**
* Given a spell cast event, returns the relevant SpellAbility involved
* Currently used to get the characteristics of the spell, specifically
* for "can't cast" effects using CAST_SPELL_LATE events
*
* @param event
* @param game
* @return SpellAbility of the event
*/
public static SpellAbility getSpellAbilityFromEvent(GameEvent event, Game game) {
if (event.getType() != GameEvent.EventType.CAST_SPELL) {
if (event.getType() != GameEvent.EventType.CAST_SPELL && event.getType() != GameEvent.EventType.CAST_SPELL_LATE) {
return null;
}