Closed jxc136 closed 1 year ago
The Prowess effect is being triggered by any player's spell casts, it should only be on the creature's controller.
Add a test where opposing player to owner casts a spell:
require 'spec_helper' RSpec.describe Magic::Cards::JeskaiElder do include_context "two player game" subject! { ResolvePermanent("Jeskai Elder", owner: p1) } context "when opponent casts a non-creature spell " do before do p2.add_mana(white: 1, blue: 1) action = cast_action(player: p2, card: Card("Revitalize")) .pay_mana(white: 1, generic: { blue: 1 }) .perform game.tick! end end end
Power and toughness should remain unchanged.
it "has a regular power and toughness" do expect(subject.power).to eq(1) expect(subject.toughness).to eq(2) end
Keyword is triggered and creature is buffed.
subject.power # => 1 subject.toughness # => 2
Thanks! I've added a regression spec to Jeskai Elder and have fixed this one up now.
Issue:
The Prowess effect is being triggered by any player's spell casts, it should only be on the creature's controller.
Steps to reproduce a Bug
Add a test where opposing player to owner casts a spell:
Expected Result
Power and toughness should remain unchanged.
Actual Result
Keyword is triggered and creature is buffed.