edo9300 / ygopro-core

ygopro script engine.
Other
45 stars 31 forks source link

Make get_card_effect also return single trigger effects #130

Closed Rundas01 closed 5 months ago

Rundas01 commented 2 years ago

The current state of get_card_effect made it skip single trigger effects because they have the actions type associated. If you have doubts whether this change breaks something, I've tested every card (including unofficial ones) which use get_card_effect, and everything works fine with this change. About 95% of the tested cards pass an effect code to get_card_effect and only care about single effects which aren't triggers, so this change won't affect them. The only card which doesn't pass a code into this function is the divine hierarchy rule card, which filters properly and therefore isn't affected by this change either. I must admit, for now, this change only helps custom cards copy trigger effects, but if it doesn't break stuff, why ignoring this chance altogether.