magefree / magefree/mage

Cost reduction don't work for opponent's contolled cards

Open
#6,074 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
2.4k
Forks
940
Avg merge
2d 12h
Merged PRs (30d)
160

Description

Affinity bug example #5931 (comments 30e8fec8df9c58e179c28ed4db32a814809ab798)

If you play card from opponent hand then you've got spell ability on the stack under your control, but original card will be under opponent control. That's can cause wrong calc like permanent count (it's calls with wrong controller).

Search potential problem code by `Ability abilityToModify)`:
![shot_191206_223835](https://user-images.githubusercontent.com/8344157/70353286-82f4ff80-1886-11ea-93a6-b5899225dc09.png)

There is different controllerId:
* `source.getControllerId()` -- always return opponent id (if you play it from opponent hand);
* `abilityToModify.getControllerId()` -- return real controller of spell ability.
![shot_191206_223128](https://user-images.githubusercontent.com/8344157/70346816-9bf6b400-1878-11ea-8aac-ca23325e5b5a.png)

Quick fix: get real controller from `abilityToModify.getControllerId()`... It's will be fine with cost reduction effects for yourself (applies on spell ability on the stack), but need more research for other cards/effects.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.