Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE when casting spells copied with Magar of the Magic Strings #6422

Open
TheLastNarwhal opened this issue Oct 23, 2024 · 3 comments · May be fixed by #6618
Open

NPE when casting spells copied with Magar of the Magic Strings #6422

TheLastNarwhal opened this issue Oct 23, 2024 · 3 comments · May be fixed by #6618
Assignees
Labels
bug Something isn't working Game Mechanics

Comments

@TheLastNarwhal
Copy link
Contributor

TheLastNarwhal commented Oct 23, 2024

Describe the bug
When the 3/3 creature created by Magar of the Magic Strings deals damage and triggers Forge crashes with an NPE.

Game-0 > java.lang.NullPointerException: Cannot invoke "forge.game.card.CardState.getType()" because "state" is null at forge.game.ability.AbilityUtils.collectSpellsForPlayEffect(AbilityUtils.java:3033) at forge.game.ability.AbilityUtils.getSpellsFromPlayEffect(AbilityUtils.java:3000) at forge.game.ability.AbilityUtils.getBasicSpellsFromPlayEffect(AbilityUtils.java:2982) at forge.game.ability.effects.PlayEffect.resolve(PlayEffect.java:197) at forge.game.spellability.AbilitySub.resolve(AbilitySub.java:104) at forge.game.ability.AbilityUtils.resolveApiAbility(AbilityUtils.java:1418) at forge.game.ability.AbilityUtils.resolve(AbilityUtils.java:1352) at forge.player.HumanPlaySpellAbility.playAbility(HumanPlaySpellAbility.java:212) at forge.player.HumanPlay.playSpellAbilityNoStack(HumanPlay.java:184) at forge.player.PlayerControllerHuman.playSpellAbilityNoStack(PlayerControllerHuman.java:255) at forge.game.trigger.WrappedAbility.resolve(WrappedAbility.java:488) at forge.game.ability.AbilityUtils.resolveApiAbility(AbilityUtils.java:1418) at forge.game.ability.AbilityUtils.resolve(AbilityUtils.java:1352) at forge.game.zone.MagicStack.resolveStack(MagicStack.java:613) at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:1119) at forge.game.GameAction.startGame(GameAction.java:2141) at forge.game.Match.startGame(Match.java:90) at forge.gamemodes.match.HostedMatch.lambda$startGame$1(HostedMatch.java:269) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840)

To Reproduce
Steps to reproduce the behavior:

  1. Use Magar of the Magic Strings
  2. Attack with the creature to trigger the ability
  3. Forge will softcrash that game with an NPE

Desktop (please complete the following information):

  • Forge Version: forge-2.0.00-SNAPSHOT-10.22
@Hanmac Hanmac added bug Something isn't working Game Mechanics labels Oct 24, 2024
@Hanmac Hanmac self-assigned this Oct 24, 2024
Copy link

This issue has not been updated in a while and has now been marked as stale. Stale messages will be auto closed.

@Northmoc Northmoc added the keep no stale label Nov 23, 2024
@Northmoc
Copy link
Contributor

Did this get fixed? Just tried this and couldn't reproduce

@tool4ever
Copy link
Contributor

check with Sejiri Shelter

@Northmoc Northmoc linked a pull request Nov 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Game Mechanics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants