Re: Card Creation Request Thread
Sumomole you are sugesting to change the first line of code with te second? i didn't get it =) hehehe
High Quality Resources for Collectible Card Games and Home of the CCGHQ Team
https://www.slightlymagic.net/forum/
https://www.slightlymagic.net/forum/viewtopic.php?f=64&t=4557
No, you have used both, but should only use one of them, I suggest you only use the first, because that's the official code, of course you also need to modify the associated code.Scion of Darkness wrote:Sumomole you are sugesting to change the first line of code with te second? i didn't get it =) hehehe
1. Use the following code instead of your code:Scion of Darkness wrote:Can someone test this please i've rewriten the card but i can't test it right now i'm at work hehehe
<PLAY_TIME_ACTION>
if EffectDC():Get_Int(2) == 1 then
EffectController():ChooseTarget( 1, "CARD_QUERY_CHOOSE_CREATURE_DEAL_2_DAMAGE", EffectDC():Make_Targets(0) )
end
</PLAY_TIME_ACTION> <RESOLUTION_TIME_ACTION>
local decision = EffectDC():Get_Int(2)
if decision == 2 then
local filter = Object():GetFilter()
filter:Clear()
filter:NotTargetted()
filter:SetPlayer( EffectController() )
filter:SetZone( ZONE_HAND )
filter:SetHint( HINT_ENEMY, EffectController() )
EffectController():SetTargetCount(2)
for i=0,1 do
EffectController():SetTargetPrompt( i, "CARD_QUERY_CHOOSE_CARD_TO_DISCARD" )
end
EffectController():ChooseTargets( NO_VALIDATION, EffectDC():Make_Targets(1) )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local decision = EffectDC():Get_Int(2)
if decision == 2 then
local targetDC = EffectDC():Get_Targets(1)
if targetDC ~= nil then
for i=0,1 do
local target_card = targetDC:Get_CardPtr(i)
if target_card ~= nil then
target_card:Discard()
end
end
end
end
</RESOLUTION_TIME_ACTION>Age, Quest, Fade, Arrow, Feather, Ki, Blood, Devotion, Death, Bounty, Omen, Shred, Luck, Polyp, Poison, Mire, Depletion, Verse, Intervention, Wish, Spore, Scream, Elixir, Wind, Mining, Bribery, Tower, Hoofprint, Ice, Trasure, Divinity, Fate, Plague, Fuse, Charge, Fate, Plague, Matrix, Petal, Magnet, Winch, Study, Flood, Shell, Corpse, Soot, Fungus, Hourglass, Tide, Currency, Hatchling, Sleep, Chip, Funk, Eon, Training, Blaze, Mannequin, and Sleight.http://www.slightlymagic.net/forum/viewtopic.php?f=63&t=7655&p=94245&hilit=signet#p94245Master Necro wrote:Could someone check this for me, it just doesn't seem to work right:
P.S. I do have the function LOL for it if anyone asks.
<COST type="Mana" cost="{1}" />
<COST type="TapSelf" />
<PRODUCES amount="{B}{G}" /> <COST type="Mana" cost="{1}"/>
<COST type="TapSelf" />
<RESOLUTION_TIME_ACTION>
ProduceMana("U",1)
ProduceMana("R",1)
</RESOLUTION_TIME_ACTION>If you want, you can find all counters type in my functions, but firemind has invented a better way to get the counter type, I highly recommend it.East Bay wrote:Just finished Vampire Hexmage but the .xml is huge so I want to remove the ones that aren't used.
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
for i=0,1 do
local counter_type = target:GetBestOrWorstCounterType(i)
while counter_type ~= 0 do
local amount = target:CountCounters( counter_type )
target:RemoveCounters( counter_type, amount )
counter_type = target:GetBestOrWorstCounterType(i)
end
end
end
</RESOLUTION_TIME_ACTION>Your code is ok, but there are a lot of basic errors, you should carefully check the structure of the code.Scion of Darkness wrote:I guess i'll need some more help the izzet charm isn't working yet, but now instead of force closing the DOTP the game just freeze but not totally, i can still concede or restart without problem
[lua] [string "IZZET_CHARM_141806_TITLE (PLAY_TIME_ACTION) [1652]"]:10:
call parameter mismatch - too many or too few a parameter count declared, method AddMultipleChoiceAnswer in class __PlayerYou use the code from here?Scion of Darkness wrote:Somomole Thanks you have been a real help here just one problem missing =s still freeze the gamesorry to bother this much
- Code: Select all
[lua] [string "IZZET_CHARM_141806_TITLE (PLAY_TIME_ACTION) [1652]"]:10:
call parameter mismatch - too many or too few a parameter count declared, method AddMultipleChoiceAnswer in class __Player




The error means that at line 10 of a PLAY_TIME_ACTION (with the <PLAY_TIME_ACTION> line being line #1), AddMultipleChoiceAnswer has the wrong number of parameters.sumomole wrote:You use the code from here?Scion of Darkness wrote:Somomole Thanks you have been a real help here just one problem missing =s still freeze the gamesorry to bother this much
- Code: Select all
[lua] [string "IZZET_CHARM_141806_TITLE (PLAY_TIME_ACTION) [1652]"]:10:
call parameter mismatch - too many or too few a parameter count declared, method AddMultipleChoiceAnswer in class __Player
I have tested it and work fine, haven't seen such problem.
EDIT: You'd better ask firemind or ohters for that how to read the error string, I know very little.
Savage Summoning is good news: some time ago I tried to imagine how to code Scout's Warning (which is similar) but I got stuck on something, can't remember exactly what.sumomole wrote:I would like to request these cards.![]()
![]()