CounterSpell

When :CounterSpell() call not from hand, it crashes game... Somebody knows something?
High Quality Resources for Collectible Card Games
https://www.slightlymagic.net/forum/
https://www.slightlymagic.net/forum/viewtopic.php?f=63&t=6094
Looking at the code, it doesn't even counter it, just changes the target of it to nil...Persee wrote:Frost Titan counter a spell if it's the target of this one.
local base_token = MTG():ObtainToken( "CANCEL_242913", Object():GetController() )
if base_token ~= nil then
local token = MTG():ObtainTokenFromSpec( base_token:GetSpec(), Object():GetController() )
if token ~= nil then
Object():GetPlayer():PseudoPlaySpell( token )
end
end
Not sure which card or what kind of variable you want, but the token identifier points to the token that's a copy of the cancel spell and I believe you can search for/filter spells on the stack by choosing cards in ZONE_STACK.sadlyblue wrote:that didn't worked.
it asks for the target, but then does nothing else.
tried with an aura also... same thing.
what is needed is to get the card as a variable.
anyone knows how to do this?
token:RemoveFromGame()
local card = "SHOCK_245012"
card:PlayFreeFromAnywhere( Object():GetController() )
attempt to call method 'PlayFreeFromAnywhere' (a nil value)