Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels) 2014
(Tejahn) Toughen Up
Moderator: CCGHQ Admins
(Tejahn) Toughen Up
by Tejahn » 19 Jan 2015, 09:01
I really wanted to post this deck tonight but I feel that I would be doing it a disservice if I were to publish it without the new Abzan keyword Bolster. I feel like Abzan Skycaptain can fit this deck perfectly. Unfortunately, I've been unsuccessful trying to code Bolster. If someone can provide that code I can run a few test with Bolster and release this deck.
Re: (Tejahn) Toughen Up
by Xander9009 » 22 Jan 2015, 01:42
I haven't tested this, but try this. The code for getting the least toughness is based on Neo's KTK function.
EDIT: Just noticed your release thread in which you mention you completed it. Sorry, I'm still getting caught up on what I've missed haha.
- Code: Select all
<RESOLUTION_TIME_ACTION>
local Player = EffectController()
local Min_Toughness = 0
local filter = ClearFilter()
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
filter:Add(FE_CONTROLLER, OP_IS, Player)
local filter_count = filter:EvaluateObjects()
if filter_count > 0 then
for i=0, filter_count-1 do
local creature = filter:GetNthEvaluatedObject(i)
if creature ~= nil then
local Toughness = creature:GetCurrentCharacteristics():Toughness_Get()
if Toughness < Min_Toughness then
Min_Toughness = Toughness
end
end
end
end
filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_CONTROLLER, OP_IS, Player )
filter:Add( FE_TOUGHNESS, OP_EQUALS, Min_Toughness )
filter_count = filter:EvaluateObjects()
if filter_count > 1 then
Player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_TO_GET_PLUS1_PLUS1_COUNTER", EffectDC():Make_Targets(0) )
elseif filter_count = 1 then
filter:GetNthEvaluatedObject(0):Make_Targets(0)
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local Target_Creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
if Target_Creature ~= nil then
Target_Creature:AddCounters( MTG():PlusOnePlusOneCounters() , 1 ) --Change 1 to Bolster number
end
</RESOLUTION_TIME_ACTION>
EDIT: Just noticed your release thread in which you mention you completed it. Sorry, I'm still getting caught up on what I've missed haha.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 13 guests