Initial commit
This commit is contained in:
@@ -0,0 +1,731 @@
|
||||
#!/bin/sh
|
||||
# Game entity
|
||||
name="Game Entity" card=GAME_ENTITY tags={10:85,20:1,49:1,198:4,202:1,204:2}
|
||||
|
||||
# Mana Card
|
||||
name="Coin" card=GAME_005 tags={49:3,202:5,313:1}
|
||||
|
||||
# Player1
|
||||
name="Player1" card=PLAYER1 tags={7:75,17:1,27:64,28:10,29:4,30:1,31:1,49:1,176:10,202:2,272:1,399:4}
|
||||
|
||||
# Player2
|
||||
name="Player2" card=PLAYER2 tags={7:75,17:1,23:1,24:1,27:66,28:10,29:4,30:2,31:2,49:1,176:10,202:2,272:1,399:3}
|
||||
|
||||
# Power of the Horde
|
||||
name="Kill Roshan" card=PRO_001c tags={183:11,202:5,48:30,330:0,331:0,} custom=1
|
||||
|
||||
# The Sentinel
|
||||
name="The Sentinel" card=TB_SPT_Boss tags={183:18,202:3,47:0,45:30,380:39537,} custom=1
|
||||
|
||||
# The Scourge
|
||||
name="The Scourge " card=LOEA04_01 tags={183:20,45:30,330:0,331:0,380:16231,202:3,} custom=1
|
||||
|
||||
# Enrage
|
||||
name="Tether" card=NAX12_04e tags={183:12,202:6,330:0,331:0,338:1,} custom=1 flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Lantern of Power
|
||||
name="Grow" card=LOEA16_3e tags={183:20,202:6,330:0,331:0,} custom=1 flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Lothar's Left Greave
|
||||
name="Arcane Boots" card=LOEA16_9 tags={183:20,202:5,48:0,330:0,331:0,} custom=1
|
||||
|
||||
# Mountain Giant
|
||||
name="Tiny" card=EX1_105 tags={183:3,202:4,201:3,203:5,48:1,47:0,45:1,251:6,321:1,} custom=1 attachment=LOEA16_3e
|
||||
|
||||
# Youthful Brewmaster
|
||||
name="Youthful Brewmaster" card=EX1_049 tags={183:3,202:4,201:2,203:1,48:2,47:3,45:2,251:6,321:1,330:0,331:0,218:1,} custom=1
|
||||
|
||||
# Brann Bronzebeard
|
||||
name="Karroch, the Beastmaster" card=LOE_077 tags={183:20,202:4,203:5,114:1,321:1,48:5,47:2,45:3,330:0,331:0,362:0,} custom=1
|
||||
|
||||
# Abomination
|
||||
name="Pudge, the Butcher" card=EX1_097 tags={183:3,202:4,201:3,203:3,48:5,47:0,45:4,251:6,321:1,330:0,331:0,190:0,217:0,} custom=1
|
||||
|
||||
# Piloted Sky Golem
|
||||
name="Boush, the Tinker" card=GVG_105 tags={183:13,321:1,48:3,202:4,203:4,47:1,45:2,200:17,330:0,331:0,217:1,} custom=1
|
||||
|
||||
# Icehowl
|
||||
[AT_125]
|
||||
|
||||
# Skeleton
|
||||
name="Skeleton" card=NAX4_03H tags={183:12,202:4,48:7,47:6,45:5,} custom=1
|
||||
|
||||
# Skeleton Knight
|
||||
name="The Skeleton King" card=AT_128 tags={183:15,321:1,203:5,202:4,48:7,47:6,45:5,114:1,330:0,331:0,217:1,} custom=1
|
||||
|
||||
# Deathwing
|
||||
name="Deathwing" card=NEW1_030 tags={183:3,203:5,202:4,48:10,47:12,45:12,200:24,114:1,321:1,330:0,331:0,218:1,} custom=1
|
||||
|
||||
# Treant
|
||||
name="Treant" card=EX1_158t tags={183:3,202:4,201:3,199:2,251:1,47:1,45:2,48:1,330:0,331:0,} custom=1
|
||||
|
||||
# Velen's Chosen
|
||||
name="Guardian Greaves" card=GVG_010 tags={183:13,203:1,202:5,48:0,199:6,321:1,330:0,331:0,} custom=1
|
||||
|
||||
# Cabalist's Tome
|
||||
name="Arcane Books" card=OG_090 tags={183:21,321:1,203:4,202:5,48:0,199:4,330:0,331:0,} custom=1
|
||||
|
||||
# Seal of Champions
|
||||
name="Black King Bar" card=AT_074 tags={183:15,321:1,203:1,202:5,48:2,199:5,330:0,331:0,} custom=1 attachment=AT_074e2
|
||||
|
||||
# Seal of Champions E
|
||||
name="Magic Immunity" card=AT_074e2 tags={183:15,202:6,199:5,330:0,331:0,} custom=1 flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Dagon
|
||||
name="Dagon" card=BRMA11_3 tags={183:14,202:5,48:1,47:1,330:0,331:0,} custom=1
|
||||
|
||||
# Sparring Partner
|
||||
[AT_069]
|
||||
|
||||
# Divine Rapier E
|
||||
name="Divine Rapier" card=FP1_020e tags={183:12,202:6,199:5,330:1,331:1,} custom=1 flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Desolator
|
||||
name="Desolator" card=LOEA06_03 tags={183:20,202:5,48:2,330:0,331:0,} custom=1 attachment=LOEA06_03e
|
||||
|
||||
# Desolator E
|
||||
name="Desolate" card=LOEA06_03e tags={183:20,202:6,330:0,331:0,} custom=1 flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Rooted
|
||||
name="Level 2" card=EX1_178ae tags={183:3,202:6,199:2,330:1,331:1,} custom=1 flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Inner Rage
|
||||
name="Satanic" card=EX1_607 tags={183:3,203:5,202:5,48:3,201:3,199:10,321:1,} custom=1 attachment=EX1_607e
|
||||
|
||||
# Angry Chicken
|
||||
name="Courier" card=EX1_009 tags={321:1,183:3,203:3,202:4,48:1,47:2,45:1,330:0,331:0,200:20,212:1,} custom=1
|
||||
|
||||
# Repel
|
||||
[LOEA16_20]
|
||||
|
||||
# Cursed Blade
|
||||
name="Echo Sabre " card=LOE_118 tags={183:20,321:1,203:3,202:7,48:2,47:0,187:3,199:10,330:0,331:0,} custom=1
|
||||
|
||||
# Shadowflame
|
||||
name="Requiem of Souls" card=EX1_303 tags={183:3,202:5,201:3,199:9,203:3,48:4,251:1,268:2,321:1,330:0,331:0,370:1,} custom=1
|
||||
|
||||
# Demonfire E
|
||||
name="Necromastery" card=EX1_596e tags={183:3,203:1,202:6,48:0,201:3,199:9,330:1,331:1,} custom=1 flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Void Crusher
|
||||
name="Eidolon" card=AT_023 tags={183:15,321:1,203:3,202:4,48:2,47:2,45:2,199:9,200:15,330:0,331:0,403:0,} custom=1
|
||||
|
||||
# Forbidden Shaping
|
||||
name="Demonic Conversion" card=OG_101 tags={183:21,321:1,203:4,202:5,48:3,199:6,330:0,331:0,} custom=1
|
||||
|
||||
# Charge E
|
||||
name="Level 1" card=CS2_103e2 tags={183:2,202:6,199:10,330:0,331:0,} custom=1 flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Inner Rage E
|
||||
name="Satanic" card=EX1_607e tags={183:3,202:6,199:10,330:1,331:1,} custom=1 flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Inner Fire E
|
||||
name="Level 3" card=CS1_129e tags={183:3,202:6,199:6,330:1,331:1,} custom=1 flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Twisting Nether
|
||||
name="The Black Hole" card=EX1_312 tags={183:3,202:5,201:3,199:9,203:4,48:8,251:1,268:2,321:1,330:0,331:0,} custom=1
|
||||
|
||||
# Mal Ganis
|
||||
[GVG_021]
|
||||
|
||||
# Lay on Hands
|
||||
name="Purification" card=EX1_354 tags={183:3,202:5,201:3,199:5,203:4,48:8,251:1,321:1,330:0,331:0,} custom=1
|
||||
|
||||
# Flame Lance
|
||||
name="Laguna Blade" card=AT_001 tags={183:15,321:1,203:1,202:5,48:8,199:4,47:10,330:0,331:0,} custom=1
|
||||
|
||||
# Dragon's Breath
|
||||
name="Dragon's Breath" card=BRM_003 tags={183:14,321:1,203:1,202:5,48:3,199:4,47:2,330:0,331:0,} custom=1
|
||||
|
||||
# Confessor Paletress
|
||||
name="Lina" card=AT_018 tags={183:15,321:1,203:5,202:4,48:2,47:1,45:14,199:6,114:1,330:0,331:0,200:16,} custom=1 level2=BRM_003 level3=AT_001
|
||||
|
||||
# Lightning Storm
|
||||
name="God's Wrath" card=EX1_259 tags={183:3,202:5,201:3,199:8,203:3,48:6,251:1,47:3,321:1,330:0,331:0,215:1,} custom=1
|
||||
|
||||
# Forked Lightning
|
||||
name="Forked Lightning" card=EX1_251 tags={183:3,202:5,201:3,199:8,203:1,48:2,251:1,47:1,321:1,330:0,331:0,215:1,} custom=1
|
||||
|
||||
# Archmage Antonidas
|
||||
name="Zeus" card=EX1_559 tags={183:3,203:5,202:4,48:3,47:1,45:15,201:3,251:3,199:4,114:1,321:1,330:0,331:0,32:1,} custom=1 level2=EX1_251 level3=EX1_259
|
||||
|
||||
# Commanding Shout
|
||||
name="Warcry" card=NEW1_036 tags={183:3,203:3,202:5,48:1,199:10,321:1,330:0,331:0,} custom=1 attachment=NEW1_036e
|
||||
|
||||
# Commanding Shout
|
||||
name="Sven: Warcry" card=NEW1_036e tags={183:3,202:6,199:10,330:0,331:0,338:1,} custom=1 flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Druid of the Claw
|
||||
name="Ursa" card=EX1_165t2 tags={183:3,203:5,202:4,48:4,47:3,45:21,199:2,330:0,331:0,200:20,190:0,} custom=1 level2=CS2_012 level3=CS2_011
|
||||
|
||||
# Open Wounds
|
||||
name="Wounded" card=AT_039e tags={183:15,202:6,199:2,330:0,331:0,338:1,} custom=1 flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Divine Strength
|
||||
name="God's Strength" card=OG_223 tags={183:21,321:1,203:1,202:5,48:3,199:5,} custom=1 attachment=OG_223e
|
||||
|
||||
# Optimism
|
||||
name="Sven: God's Strength" card=OG_223e tags={183:21,202:6,} custom=1 flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Tirion Fordring
|
||||
name="Sven" card=EX1_383 tags={183:3,203:5,202:4,48:3,47:3,45:16,201:3,199:5,251:1,114:1,321:1,330:0,331:0,194:0,190:0,217:0,} custom=1 level2=NEW1_036 level3=OG_223
|
||||
|
||||
# Windfury
|
||||
[CS2_039]
|
||||
|
||||
# Corruption
|
||||
name="Corruption" card=CS2_063 tags={183:2,202:5,201:3,199:9,203:1,48:1,251:1,321:1,330:0,331:0,} custom=1 attachment=CS2_063e
|
||||
# Corruption E
|
||||
name="Corruption" card=CS2_063e tags={183:2,202:6,199:9,330:2,331:2,} custom=1 flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Hunter's Mark
|
||||
[CS2_084] attachment=CS2_084e
|
||||
# Hunter's Mark E
|
||||
name="Hunter's Mark E" card=CS2_084e tags={12:1,49:6,202:6} flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Assasinate
|
||||
name="Assassinate" card=CS2_076 tags={183:2,202:5,201:3,199:7,203:2,48:5,251:6,268:2,321:1,330:0,331:0,} custom=1
|
||||
|
||||
# Shadow Word: Death
|
||||
[EX1_622]
|
||||
|
||||
# Shadow Word: Pain
|
||||
name="Shadow Word: Pain" card=CS2_234 tags={321:1,183:2,203:2,202:5,48:2,199:6,330:0,331:0,} custom=1
|
||||
|
||||
# Execute
|
||||
name="Culling Blade" card=CS2_108 tags={183:2,202:5,201:3,199:10,203:2,48:3,251:1,268:2,321:1,330:0,331:0,} custom=1
|
||||
|
||||
# Illidan
|
||||
name="Terrorblade" card=EX1_614 tags={183:3,203:5,202:4,48:6,45:1,47:5,201:3,251:6,114:1,321:1,330:0,331:0,200:15,32:1,} custom=1
|
||||
|
||||
# Hand of Protection
|
||||
name="Guardian Angel" card=EX1_371 tags={183:2,203:2,202:5,48:2,199:5,201:3,251:1,321:1,330:0,331:0,} custom=1
|
||||
|
||||
# Polymorph
|
||||
[CS2_022] attachment=CS2_022e
|
||||
name="Polymorph E" card=CS2_022e tags={12:1,49:6,202:6} flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Hex
|
||||
[EX1_246] attachment=EX1_246e
|
||||
# Hex E
|
||||
name="Hex E" card="EX1_246e" tags={12:1,49:6,202:6} flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Blessing of Kings
|
||||
[CS2_092] attachment=CS2_092e
|
||||
# Blessing of Kings E
|
||||
name="Blessing of Kings E" card="CS2_092e" tags={12:1,49:6,202:6} flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Blessing of Might
|
||||
[CS2_087] attachment=CS2_087e
|
||||
# Blessing of Might E
|
||||
name="Blessing of Might E" card="CS2_087e" tags={12:1,49:6,202:6} flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Power Word: Shield
|
||||
[CS2_004] attachment=CS2_004e
|
||||
# Power Word: Shield E
|
||||
name="Power Word: Shield E" card="CS2_004e" tags={12:1,49:6,202:6} flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Charge
|
||||
[CS2_103] attachment=CS2_103e2
|
||||
# Charge E
|
||||
#name="Charge E" card="CS2_103e2" tags={12:1,49:6,202:6} flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Mark of the Wild
|
||||
[CS2_009] attachment=CS2_009e
|
||||
# Mark of the Wild E
|
||||
name="Mark of the Wild E" card="CS2_009e" tags={12:1,49:6,202:6} flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Ancestral Healing
|
||||
[CS2_041] attachment=CS2_041e
|
||||
# Ancestral Infusion
|
||||
name="Ancestral Infusion" card="CS2_041e" tags={12:1,49:6,202:6} flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Rockbiter Weapon
|
||||
[CS2_045] attachment=CS2_045e
|
||||
# Rockbiter Weapon E
|
||||
name="Rockbiter Weapon E" card=CS2_045e tags={12:1,49:6,202:6} flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Divine spirit
|
||||
[CS2_236]
|
||||
|
||||
# Bloodlust
|
||||
[CS2_046] attachment=CS2_046e
|
||||
# Bloodlust E
|
||||
name="Bloodlust E" card=CS2_046e tags={12:1,49:6,202:6} flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Claw
|
||||
[CS2_005] attachment=CS2_005o
|
||||
# Claw E
|
||||
name="Claw E" card=CS2_005o tags={12:1,49:6,202:6} flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Heroic Strike
|
||||
[CS2_105] attachment=CS2_105e
|
||||
# Heroic Strike E
|
||||
name="Heroic Strike E" card=CS2_105e tags={12:1,49:6,202:6} flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Savage Roar
|
||||
name="Enrage" card=CS2_011 tags={183:2,202:5,201:3,199:2,203:1,48:3,251:1,321:1,330:0,331:0,} custom=1 attachment=CS2_011o
|
||||
# Savage Roar E
|
||||
name="Enraged" card=CS2_011o tags={183:2,202:6,199:2,330:1,331:1,338:1,} custom=1 flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Warrior
|
||||
name="Warrior" card=HERO_01 tags={12:1,45:30,49:1,201:3,202:3,203:2} flags=(CARD_HERO)
|
||||
# Shamman
|
||||
name="Shamman" card=HERO_02 tags={12:1,45:30,49:1,201:3,202:3,203:2} flags=(CARD_HERO)
|
||||
# Rogue
|
||||
#name="Rogue" card=TB_SPT_Boss tags={12:1,45:30,49:1,201:3,202:3,203:2} flags=(CARD_HERO)
|
||||
# Paladin
|
||||
name="Paladin" card=HERO_04 tags={12:1,45:30,49:1,201:3,202:3,203:2} flags=(CARD_HERO)
|
||||
# Hunter
|
||||
name="Hunter" card=HERO_05 tags={12:1,45:30,49:1,201:3,202:3,203:2} flags=(CARD_HERO)
|
||||
# Druid
|
||||
name="Druid" card=HERO_06 tags={12:1,45:30,49:1,201:3,202:3,203:2} flags=(CARD_HERO)
|
||||
# Warlock
|
||||
name="Warlock" card=HERO_07 tags={12:1,45:30,49:1,201:3,202:3,203:2} flags=(CARD_HERO)
|
||||
# Mage
|
||||
name="Mage" card=HERO_08 tags={12:1,45:30,49:1,201:3,202:3,203:2} flags=(CARD_HERO)
|
||||
# Priest
|
||||
#name="Priest" card=LOEA04_01 tags={12:1,45:30,49:1,201:3,202:3,203:2} flags=(CARD_HERO)
|
||||
# King of Khaz Modan
|
||||
name="King of Khaz Modan" card=HERO_01a tags={12:1,45:30,49:1,201:3,202:3,203:2} flags=(CARD_HERO)
|
||||
# Blood Knight Matriarch
|
||||
name="Blood Knight Matriarch" card=HERO_04a tags={12:1,45:30,49:1,201:3,202:3,203:2} flags=(CARD_HERO)
|
||||
# Alleria Windranger
|
||||
name="Alleria Windranger" card=HERO_05a tags={12:1,45:30,49:1,201:3,202:3,203:2} flags=(CARD_HERO)
|
||||
# Guardian Medivh
|
||||
name="Guardian Medivh" card=HERO_08a tags={12:1,45:30,49:1,201:3,202:3,203:2} flags=(CARD_HERO)
|
||||
# Khadgar
|
||||
name="Khadgar" card=HERO_08b tags={12:1,45:30,49:1,201:3,202:3,203:2} flags=(CARD_HERO)
|
||||
|
||||
# Ice lance
|
||||
#CS2_031 tags={12:1,47:0,48:1,49:3,201:3,202:5,203:2,264:1} flags=(CARD_SPELL|CARD_SPELL_DAMAGE|CARD_TARGETING|CARD_FREEZE|CARD_TARGET_FROZEN_4_DMG)
|
||||
|
||||
# Holy Smite
|
||||
[CS1_130]
|
||||
|
||||
# Fireball
|
||||
[CS2_029]
|
||||
|
||||
# Swipe
|
||||
name="Swipes" card=CS2_012 tags={183:2,202:5,201:3,199:2,203:1,48:2,251:1,47:2,321:1,330:0,331:0,} custom=1 attachment=AT_039e
|
||||
|
||||
# Hammer of Wrath
|
||||
[CS2_094]
|
||||
|
||||
# Backstab
|
||||
name="Backstab" card=CS2_072 tags={183:2,202:5,201:3,199:7,203:2,251:6,48:0,47:2,268:2,321:1,330:0,331:0,} custom=1
|
||||
|
||||
# Drain Life
|
||||
[CS2_061]
|
||||
|
||||
# Sacrificial Pact
|
||||
[NEW1_003]
|
||||
|
||||
# Arcane Shot
|
||||
name="Arcane Shot" card=DS1_185 tags={183:2,202:5,201:3,199:3,203:2,48:1,251:8,47:2,321:1,} custom=1
|
||||
|
||||
# Soulfire
|
||||
[EX1_308]
|
||||
|
||||
# Mortal Coil
|
||||
[EX1_302]
|
||||
|
||||
# Shield Block
|
||||
[EX1_606]
|
||||
|
||||
# Shiv
|
||||
[EX1_278]
|
||||
|
||||
# Starfire
|
||||
[EX1_173]
|
||||
|
||||
# Moonfire
|
||||
[CS2_008]
|
||||
|
||||
# Kill Command
|
||||
[EX1_539]
|
||||
|
||||
# Frostbolt
|
||||
name="Frostbolt" card=CS2_024 tags={183:2,202:5,201:3,199:4,203:1,48:2,251:1,47:3,268:2,321:1,208:1,} custom=1
|
||||
|
||||
# Frost Shock
|
||||
[CS2_037]
|
||||
|
||||
# Shadow Bolt
|
||||
[CS2_057]
|
||||
|
||||
# Feral Rage - choose one
|
||||
#OG_047 tags={12:1,48:2,49:3,201:3,202:5,203:2,264:1} flags=(CARD_SPELL|CARD_SPELL_DAMAGE|CARD_NONTARGET)
|
||||
|
||||
# Arcane intellect
|
||||
name="Arcane Intellect" card=CS2_023 tags={183:2,202:5,201:3,199:4,203:2,48:3,251:1,268:2,321:1,330:0,331:0,} custom=1
|
||||
|
||||
# Sprint
|
||||
name="Sprint" card=CS2_077 tags={183:2,202:5,201:3,199:7,203:1,48:7,251:1,268:2,321:1,330:0,331:0,} custom=1
|
||||
|
||||
# Arcane Explosion
|
||||
[CS2_025]
|
||||
|
||||
# Arcane Missiles
|
||||
[EX1_277]
|
||||
|
||||
# Tracking
|
||||
[DS1_184]
|
||||
|
||||
# Sinister Strike
|
||||
[CS2_075]
|
||||
|
||||
# Mind Blast
|
||||
[DS1_233]
|
||||
|
||||
# Frost Nova
|
||||
name="Shiva's Guard" card=CS2_026 tags={183:2,202:5,201:3,199:4,203:1,48:3,251:1,47:1,268:2,321:1,330:0,331:0,208:1,} custom=1
|
||||
|
||||
# Fan of Knives
|
||||
[EX1_129]
|
||||
|
||||
# Cleave
|
||||
[CS2_114]
|
||||
|
||||
# Multishot
|
||||
[DS1_183]
|
||||
|
||||
# Mind Vision
|
||||
[CS2_003]
|
||||
|
||||
# Flamestrike
|
||||
[CS2_032]
|
||||
|
||||
# Whirlwind
|
||||
name="Counter Helix" card=EX1_400 tags={183:2,202:5,201:3,199:10,203:1,48:0,251:1,47:1,321:1,330:0,331:0,} custom=1
|
||||
|
||||
# Consecration
|
||||
[CS2_093]
|
||||
|
||||
# Holy Nova
|
||||
name="Mekansm" card=CS1_112 tags={183:2,202:5,201:3,199:6,203:1,48:4,251:5,321:1,330:0,331:0,} custom=1
|
||||
|
||||
# Hellfire
|
||||
[CS2_062]
|
||||
|
||||
# Water Elemental
|
||||
[CS2_033]
|
||||
|
||||
################
|
||||
# Aura
|
||||
###############
|
||||
|
||||
# Raid leader
|
||||
[CS2_122] attachment=CS2_122e
|
||||
# Enhanced
|
||||
name="Enhanced" card=CS2_122e tags={12:1,49:6,202:6} flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Stormwind champion
|
||||
name="Stormwind Champion" card=CS2_222 tags={183:2,202:4,201:2,203:1,48:7,47:6,45:6,251:1,321:1,330:0,331:0,362:1,} custom=1 attachment=CS2_222o
|
||||
# Might of Stormwind
|
||||
name="Might of Stormwind" card=CS2_222o tags={183:2,202:6,330:1,331:0,} custom=1 flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Warsong Commander
|
||||
[EX1_084] attachment=EX1_084e
|
||||
# Charge
|
||||
name="Charge" card=EX1_084e tags={12:1,49:6,202:6} flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Timber Wolf
|
||||
[DS1_175] attachment=DS1_175o
|
||||
# Furious Howl
|
||||
name="Furious Howl" card=DS1_175o tags={12:1,49:6,202:6} flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Gurubashi Berserker
|
||||
[EX1_399] attachment=EX1_399e
|
||||
# Berserking
|
||||
name="Berserking" card=EX1_399e tags={12:1,49:6,202:6} flags=(CARD_ATTACHMENT)
|
||||
|
||||
|
||||
################
|
||||
# Battlecry
|
||||
###############
|
||||
|
||||
# Dread Infernal
|
||||
[CS2_064]
|
||||
|
||||
# Novice engineer
|
||||
[EX1_015]
|
||||
|
||||
# Gnomish Inventor
|
||||
[CS2_147]
|
||||
|
||||
# Darkscale Healer
|
||||
[DS1_055]
|
||||
|
||||
# Guardian of Kings
|
||||
name="Omniknight" card=CS2_088 tags={183:2,202:4,201:3,199:5,203:1,48:2,251:5,45:17,47:1,321:1,218:1,} custom=1
|
||||
|
||||
# Nightblade
|
||||
name="Phantom Assassin" card=EX1_593 tags={183:2,203:2,202:4,48:4,45:2,47:4,201:3,321:1,218:1,} custom=1
|
||||
|
||||
# Acidic Swamp Ooze
|
||||
[EX1_066]
|
||||
|
||||
# Voodoo doctor
|
||||
name="Witch Doctor" card=EX1_011 tags={183:2,202:4,201:1,203:2,48:1,47:2,45:1,251:6,321:1,218:1,} custom=1
|
||||
|
||||
# Elven Archer
|
||||
[CS2_189]
|
||||
|
||||
# Fire Elemental
|
||||
name="Fire Elemental" card=CS2_042 tags={183:2,202:4,201:3,199:8,203:1,48:6,47:6,45:5,251:3,321:1,218:1,} custom=1
|
||||
|
||||
# Ironforge Rifleman
|
||||
[CS2_141]
|
||||
|
||||
# Stormpike Commando
|
||||
[CS2_150]
|
||||
|
||||
# Frostwolf Warlord
|
||||
name="Legion Commander" card=CS2_226 tags={183:2,202:4,201:1,203:4,48:5,47:4,45:4,251:1,321:1,330:0,331:0,218:1,} custom=1 attachment=CS2_226e
|
||||
# Frostwolf Banner
|
||||
name="Frostwolf Banner" card=CS2_226e tags={183:2,202:6,330:1,331:1,} custom=1 flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Succubus
|
||||
name="Queen of Pain" card=EX1_306 tags={183:2,202:4,201:3,199:9,200:15,203:2,48:3,47:4,45:3,251:1,268:2,321:1,218:1,} custom=1
|
||||
|
||||
# Sap
|
||||
name="Sap" card=EX1_581 tags={183:2,203:2,202:5,48:2,201:3,199:7,268:2,321:1,330:0,331:0,} custom=1
|
||||
|
||||
# Mind Control
|
||||
[CS1_113] attachment=CS1_113e
|
||||
# Mind Control E
|
||||
name="Mind Control E" card=CS1_113e tags={12:1,49:6,202:6} flags=(CARD_ATTACHMENT)
|
||||
|
||||
# Vanish
|
||||
[NEW1_004]
|
||||
|
||||
################
|
||||
# Spell damage
|
||||
###############
|
||||
|
||||
# Archmage
|
||||
[CS2_155]
|
||||
|
||||
# Dalaran mage
|
||||
[EX1_582]
|
||||
|
||||
# Kobold geomancer
|
||||
[CS2_142]
|
||||
|
||||
# Ogre magi
|
||||
[CS2_197]
|
||||
|
||||
################
|
||||
# Charge
|
||||
###############
|
||||
|
||||
# Wolfirder
|
||||
[CS2_124]
|
||||
|
||||
# Bluegill warrior
|
||||
[CS2_173]
|
||||
|
||||
# Kor'kron elite
|
||||
name="Mogul Khan, Axe" card=NEW1_011 tags={183:2,203:5,202:4,321:1,330:0,331:0,48:3,47:2,45:20,199:10,197:0,} custom=1 level3=CS2_108
|
||||
|
||||
# Stormwind knight
|
||||
[CS2_131]
|
||||
|
||||
# Reckless rocketeer
|
||||
[CS2_213]
|
||||
|
||||
# Stonetusk boar
|
||||
name="Stonetusk Boar" card=CS2_171 tags={183:2,202:4,201:3,200:20,203:2,48:1,47:1,45:1,251:6,268:2,321:1,197:0,} custom=1
|
||||
|
||||
# Huffer
|
||||
[NEW1_034] flags=(CARD_UNCOLLECTIBLE)
|
||||
|
||||
################
|
||||
# Divine shield
|
||||
###############
|
||||
|
||||
# Scarlet Crusader
|
||||
[EX1_020]
|
||||
|
||||
################
|
||||
# Taunt
|
||||
###############
|
||||
|
||||
# Lord of the Arena
|
||||
[CS2_162]
|
||||
|
||||
# Booty bay bodyguard
|
||||
[CS2_187]
|
||||
|
||||
# Frostwolf Grunt
|
||||
[CS2_121]
|
||||
|
||||
# Goldshire footman
|
||||
[CS1_042]
|
||||
|
||||
# Ironbark protector
|
||||
[CS2_232]
|
||||
|
||||
# Sen'jin Shieldmasta
|
||||
[CS2_179]
|
||||
|
||||
# Voidwalker
|
||||
name="Enigma" card=CS2_065 tags={183:2,202:4,201:3,199:9,200:15,203:5,48:2,45:15,251:9,47:1,268:2,321:1,190:0,} custom=1 level2=OG_101 level3=EX1_312
|
||||
|
||||
# Misha
|
||||
[NEW1_032] flags=(CARD_UNCOLLECTIBLE)
|
||||
|
||||
# Frog
|
||||
[hexfrog] flags=(CARD_UNCOLLECTIBLE)
|
||||
|
||||
################
|
||||
# Totem
|
||||
###############
|
||||
|
||||
# Wrath of Air Totem
|
||||
[CS2_052] flags=(CARD_UNCOLLECTIBLE|CARD_TOTEMIC_CALL_CHILD)
|
||||
# Stoneclaw Totem
|
||||
[CS2_051] flags=(CARD_UNCOLLECTIBLE|CARD_TOTEMIC_CALL_CHILD)
|
||||
# Searing Totem
|
||||
[CS2_050] flags=(CARD_UNCOLLECTIBLE|CARD_TOTEMIC_CALL_CHILD)
|
||||
# Healing Totem
|
||||
[NEW1_009] flags=(CARD_UNCOLLECTIBLE|CARD_TOTEMIC_CALL_CHILD)
|
||||
# Flametongue Totem
|
||||
[EX1_565] attachment=EX1_565o
|
||||
# Flametongue
|
||||
name="Flametongue" card=EX1_565o tags={12:1,49:6,202:6} flags=(CARD_ATTACHMENT)
|
||||
|
||||
################
|
||||
# Summon
|
||||
###############
|
||||
|
||||
# Mirror Image
|
||||
[CS2_027]
|
||||
# Mirror Image
|
||||
[CS2_mirror]
|
||||
|
||||
# Animal Companion
|
||||
[NEW1_031]
|
||||
|
||||
# Dragonling Mechanic
|
||||
[EX1_025]
|
||||
# Mechanical Dragonling
|
||||
[EX1_025t] flags=(CARD_UNCOLLECTIBLE)
|
||||
|
||||
# Murloc Tidehunter
|
||||
[EX1_506]
|
||||
# Murloc Scout
|
||||
name="Murloc Scout" card=EX1_506a tags={183:2,202:4,201:3,200:14,203:1,47:1,45:1,251:1,48:0,} custom=1 flags=(CARD_UNCOLLECTIBLE)
|
||||
|
||||
# Razorfen Hunter
|
||||
[CS2_196]
|
||||
|
||||
# Leokk
|
||||
[NEW1_033] flags=(CARD_UNCOLLECTIBLE)
|
||||
|
||||
# Starving Buzzard
|
||||
name="Vulture" card=CS2_237 tags={321:1,183:2,203:1,202:4,48:1,47:1,45:1,199:3,200:20,330:0,331:0,32:1,} custom=1
|
||||
|
||||
# Sheep
|
||||
[CS2_tk1] flags=(CARD_UNCOLLECTIBLE)
|
||||
|
||||
# Avator of the Coin
|
||||
[GAME_002] flags=(CARD_UNCOLLECTIBLE)
|
||||
|
||||
# Boar
|
||||
name="Boar" card=CS2_boar tags={183:2,202:4,201:3,203:1,47:1,45:1,251:1,48:1,200:20,330:0,331:0,} custom=1 flags=(CARD_UNCOLLECTIBLE)
|
||||
# Oasis Snapjaw
|
||||
name="Oasis Snapjaw" card=CS2_119 tags={321:1,183:2,203:2,202:4,48:4,47:2,45:7,200:20,} custom=1
|
||||
# Bloodfen Raptor
|
||||
name="Bloodfen Raptor" card=CS2_172 tags={183:2,203:2,202:4,48:2,45:2,47:3,201:1,251:1,268:2,321:1,200:20,} custom=1
|
||||
# Magma Rager
|
||||
name="Shadow Fiend" card=CS2_118 tags={321:1,183:2,203:5,202:4,48:2,47:1,45:14,330:0,331:0,} custom=1 level3=EX1_303
|
||||
|
||||
# Puddlestomper
|
||||
#GVG_064 tags={12:1,45:2,47:3,48:2,49:3,202:4,203:2} flags=(CARD_MINION)
|
||||
# Wisp
|
||||
name="Wisp" card=CS2_231 tags={183:3,203:1,202:4,48:2,45:2,47:0,201:3,251:7,} custom=1 attachment=NAX12_04e
|
||||
|
||||
# Core Hound
|
||||
name="Core Hound" card=CS2_201 tags={321:1,183:2,203:1,202:4,48:7,47:9,45:5,200:20,} custom=1
|
||||
|
||||
# Murloc Raider
|
||||
name="Murloc Raider" card=CS2_168 tags={183:2,202:4,201:2,203:2,48:1,47:2,45:1,251:1,321:1,200:14,} custom=1
|
||||
|
||||
# River Crocolisk
|
||||
name="River Crocolisk" card=CS2_120 tags={321:1,183:2,203:2,202:4,48:2,47:2,45:3,200:20,} custom=1
|
||||
|
||||
# Boulderfist Ogre
|
||||
name="Boulderfist Ogre" card=CS2_200 tags={321:1,183:2,203:2,202:4,48:6,47:6,45:7,} custom=1
|
||||
|
||||
# Chillwind Yeti
|
||||
name="Chillwind Yeti" card=CS2_182 tags={183:2,202:4,201:3,203:1,48:4,47:4,45:5,251:6,268:2,321:1,330:0,331:0,} custom=1
|
||||
|
||||
# Fireblast
|
||||
name="Fireblast" card=CS2_034 tags={12:1,47:1,48:2,49:1,201:3,202:10,203:2} flags=(CARD_HEROPOWER|CARD_TARGETING|CARD_SPELL|CARD_HP_SPELL_DAMAGE)
|
||||
|
||||
# Lesser Heal
|
||||
# name="Lesser Heal" card=CS1h_001 tags={12:1,47:2,48:2,49:1,201:3,202:10,203:2} flags=(CARD_HEROPOWER|CARD_TARGETING|CARD_SPELL|CARD_SPELL_HEAL)
|
||||
|
||||
# Lesser Heal
|
||||
name="Lesser Heal" card=CS1h_001 tags={183:2,202:10,201:3,199:6,203:2,48:2,251:1,} custom=1
|
||||
|
||||
# Healing Touch
|
||||
[CS2_007]
|
||||
|
||||
# Holy Light
|
||||
[CS2_089]
|
||||
|
||||
# Reinforce
|
||||
name="Reinforce" card=CS2_101 tags={12:1,48:2,49:1,201:3,202:10,203:2} flags=(CARD_HEROPOWER|CARD_SPELL|CARD_NONTARGET|CARD_HP_REINFORCE|CARD_SUMMON)
|
||||
# Silverhand Recruit
|
||||
[CS2_101t] flags=(CARD_MINION|CARD_UNCOLLECTIBLE)
|
||||
|
||||
# Dagger Mastery
|
||||
name="Dagger Mastery" card=CS2_083b tags={12:1,48:2,49:1,201:3,202:10,203:2} flags=(CARD_HEROPOWER|CARD_SPELL|CARD_NONTARGET|CARD_HP_DAGGERMASTERY|CARD_SUMMON)
|
||||
|
||||
################
|
||||
# Weapon
|
||||
###############
|
||||
|
||||
# Wicked Knife
|
||||
[CS2_082] flags=(CARD_UNCOLLECTIBLE)
|
||||
|
||||
# Assassin's Blade
|
||||
[CS2_080]
|
||||
|
||||
# Truesilver Champion
|
||||
name="Divine Rapier" card=CS2_097 tags={183:2,202:7,201:3,199:5,203:1,48:5,47:8,187:1,251:6,321:1,330:0,331:0,32:1,} custom=1
|
||||
|
||||
# Fiery War Axe
|
||||
[CS2_106]
|
||||
|
||||
# Light's Justice
|
||||
[CS2_091]
|
||||
|
||||
# Arcanite reaper
|
||||
[CS2_112]
|
||||
|
||||
##############
|
||||
|
||||
# Totemic Call
|
||||
[CS2_049] tags={12:1,48:2,49:1,201:3,202:10,203:2} flags=(CARD_HEROPOWER|CARD_SPELL|CARD_NONTARGET|CARD_SUMMON|CARD_HP_TOTEMIC_CALL)
|
||||
|
||||
# Shapeshift
|
||||
[CS2_017] tags={12:1,47:1,48:2,49:1,201:3,202:10,203:2} flags=(CARD_HEROPOWER|CARD_SPELL|CARD_NONTARGET|CARD_HP_SHAPESHIFT|CARD_SUMMON)
|
||||
|
||||
# Armor Up
|
||||
[CS2_102] tags={12:1,47:2,48:2,49:1,201:3,202:10,203:2} flags=(CARD_HEROPOWER|CARD_SPELL|CARD_NONTARGET|CARD_HP_ARMORUP|CARD_SUMMON)
|
||||
|
||||
# Life Tap
|
||||
[CS2_056] tags={12:1,47:2,48:2,49:1,201:3,202:10,203:2} flags=(CARD_HEROPOWER|CARD_SPELL|CARD_NONTARGET|CARD_HP_LIFETAP|CARD_SUMMON)
|
||||
|
||||
# Steady Shot
|
||||
[DS1h_292] tags={12:1,47:2,48:2,49:1,201:3,202:10,203:2} flags=(CARD_HEROPOWER|CARD_TARGETING|CARD_SPELL|CARD_HP_SPELL_DAMAGE|CARD_TARGET_HERO)
|
||||
|
||||
# Empty mana card
|
||||
name="Empty card" card=MANA_CARD tags={12:1,49:3,263:5} flags=(CARD_UNCOLLECTIBLE)
|
||||
|
||||
# No card
|
||||
name="No Card" card=NO_CARD tags={49:2} flags=(CARD_UNCOLLECTIBLE)
|
||||
@@ -0,0 +1,274 @@
|
||||
'''
|
||||
hm_gameserver - hearthmod gameserver
|
||||
Copyright (C) 2016 Filip Pancik
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
'''
|
||||
import os
|
||||
import sys
|
||||
import shlex
|
||||
|
||||
allflags = []
|
||||
index = 0
|
||||
|
||||
def parse(src):
|
||||
global allflags
|
||||
global index
|
||||
entities = []
|
||||
f = open(src, "r")
|
||||
|
||||
ri = 0
|
||||
|
||||
lines = f.readlines();
|
||||
for l in lines:
|
||||
ri = ri + 1
|
||||
if(len(l) < 10): # new lines
|
||||
continue
|
||||
if(l[0] == "#"): # comment
|
||||
continue
|
||||
|
||||
arr = shlex.split(l)
|
||||
|
||||
f = ''
|
||||
att = ''
|
||||
custom = ''
|
||||
c = ''
|
||||
t = ''
|
||||
level2 = ''
|
||||
level3 = ''
|
||||
|
||||
for a in arr:
|
||||
sub = a.split("=")
|
||||
if(len(sub) != 2):
|
||||
continue
|
||||
|
||||
if(sub[0] == "name"):
|
||||
n = sub[1]
|
||||
elif(sub[0] == "card"):
|
||||
c = sub[1]
|
||||
elif(sub[0] == "tags"):
|
||||
t = sub[1]
|
||||
elif(sub[0] == "flags"):
|
||||
f = sub[1]
|
||||
elif(sub[0] == "attachment"):
|
||||
att = sub[1]
|
||||
elif(sub[0] == "custom"):
|
||||
custom = sub[1]
|
||||
elif(sub[0] == "level2"):
|
||||
level2 = sub[1]
|
||||
elif(sub[0] == "level3"):
|
||||
level3 = sub[1]
|
||||
else:
|
||||
print 'parsing %s failed' % sub[0]
|
||||
exit(1)
|
||||
|
||||
if(len(c) == 0 or len(t) == 0):
|
||||
continue
|
||||
|
||||
d = {}
|
||||
|
||||
if(len(level2) > 0):
|
||||
d['level2'] = level2
|
||||
|
||||
if(len(level3) > 0):
|
||||
d['level3'] = level3
|
||||
|
||||
d['desc'] = n
|
||||
d['name'] = c
|
||||
|
||||
if(len(f) > 0):
|
||||
flags = f.replace("\n", "")
|
||||
allflags.append([index, flags, d['name']])
|
||||
d['rawflags'] = flags
|
||||
|
||||
d['flags'] = '{{0, 0, 0, 0, 0, 0, 0, 0}}'
|
||||
|
||||
if(len(att) > 0):
|
||||
d['attachment'] = att
|
||||
|
||||
d['tags'] = {}
|
||||
if(len(t) > 0):
|
||||
properties = t.replace(",}", "}").split(",")
|
||||
for p in properties:
|
||||
a = p.split(":")
|
||||
idx = a[0].replace("{", "")
|
||||
tz = a[1].replace("\n", "").replace("}", "")
|
||||
d['tags'][idx] = tz
|
||||
|
||||
if(len(custom) > 0):
|
||||
d['custom'] = custom
|
||||
print 'Active card: ' + d['desc'] + ' [' + d['name'] + ']'
|
||||
|
||||
entities.append(d)
|
||||
|
||||
index = index + 1
|
||||
return entities
|
||||
|
||||
def gen_js_cards(e):
|
||||
out = 'var cards = [\n'
|
||||
for d in e :
|
||||
for key in d:
|
||||
if(key == 'rawflags'):
|
||||
if((d[key].find("CARD_MINION") > -1 or d[key].find("CARD_SPELL") > -1) and\
|
||||
d[key].find("CARD_UNCOLLECTIBLE") == -1 and d[key].find("CARD_HERO") == -1 and\
|
||||
d[key].find("CARD_HEROPOWER") == -1
|
||||
):
|
||||
out += '["%s", "%s"], \n' % (d['name'], d['desc'])
|
||||
|
||||
out += '];'
|
||||
|
||||
f = open("cards.js", "w")
|
||||
f.write(out)
|
||||
f.close()
|
||||
|
||||
def gen_js_hp(e):
|
||||
out = 'var cards_hp = [\n'
|
||||
for d in e :
|
||||
for key in d:
|
||||
if(key == 'rawflags'):
|
||||
if(d[key].find("CARD_HEROPOWER") > -1):
|
||||
out += '["%s", "%s"], \n' % (d['name'], d['desc'])
|
||||
|
||||
out += '];'
|
||||
|
||||
f = open("cards_hp.js", "w")
|
||||
f.write(out)
|
||||
f.close()
|
||||
|
||||
def gen_js_hero(e):
|
||||
out = 'var cards_hero = [\n'
|
||||
for d in e :
|
||||
for key in d:
|
||||
if(key == 'rawflags'):
|
||||
if(d[key] == "(CARD_HERO)"):
|
||||
out += '["%s", "%s"], \n' % (d['name'], d['desc'])
|
||||
|
||||
out += '];'
|
||||
|
||||
f = open("cards_hero.js", "w")
|
||||
f.write(out)
|
||||
f.close()
|
||||
|
||||
def gen(e):
|
||||
out = '#include <ent_gen.h>\n'
|
||||
out += '#include <ent.h>\n'
|
||||
header = '#ifndef ENTGEN_H_\n#define ENTGEN_H_\n\n#define MAX_ENTITIES %d\n' % len(e)
|
||||
out += 'struct ent_s entities[MAX_ENTITIES] = {'
|
||||
index = 0
|
||||
beasts = []
|
||||
totems = []
|
||||
totemic_call = []
|
||||
hp = []
|
||||
|
||||
for d in e:
|
||||
flags = ''
|
||||
attch = '(void *)0, '
|
||||
val = '{'
|
||||
level2 = "(void *)0, "
|
||||
level3 = "(void *)0, "
|
||||
|
||||
for key in d:
|
||||
if(key == 'name'):
|
||||
start = '{ "%s", %d, %d, ' % (d[key], len(d[key]), len(d['tags']))
|
||||
elif(key == 'desc'):
|
||||
desc = '"%s", ' % d[key]
|
||||
elif(key == 'level2'):
|
||||
level2 = '"%s", ' % d[key]
|
||||
elif(key == 'level3'):
|
||||
level3 = '"%s", ' % d[key]
|
||||
elif(key == 'flags'):
|
||||
flags = '%s, ' % d[key]
|
||||
elif(key == 'attachment'):
|
||||
attch = "\"%s\", " % d[key]
|
||||
elif(key == 'rawflags'):
|
||||
tt = 1
|
||||
elif(key == 'custom'):
|
||||
tt = 1
|
||||
elif(key == 'tags'):
|
||||
for k, v in d[key].items():
|
||||
val += '{ %s, %s }, ' % (k, v)
|
||||
|
||||
val += ' }} // %d \n, ' % index
|
||||
|
||||
out += start + level2 + level3 + desc + flags + attch + val
|
||||
index = index + 1
|
||||
|
||||
out += '};'
|
||||
|
||||
out += '\n\nvoid entities_init() {\n'
|
||||
for i in allflags:
|
||||
arr = i[1].split("|")
|
||||
for a in arr:
|
||||
cm = a.replace("(", "").replace(")", "")
|
||||
if(cm == "CARD_RACE_BEAST"):
|
||||
beasts.append(i[2])
|
||||
if(cm == "CARD_RACE_TOTEM"):
|
||||
totems.append(i[2])
|
||||
if(cm == "CARD_TOTEMIC_CALL_CHILD"):
|
||||
totemic_call.append(i[2])
|
||||
if(cm == "CARD_HEROPOWER"):
|
||||
hp.append(i[2])
|
||||
|
||||
out += '\tflag(&entities[%s].flags, %s, FLAG_SET);\n' % (i[0], cm)
|
||||
|
||||
out += '}\n'
|
||||
header += "#define MAX_BEASTS %d\n" % len(beasts)
|
||||
header += "#define MAX_TOTEMS %d\n" % len(totems)
|
||||
header += "#define MAX_TOTEMIC_CALL %d\n" % len(totemic_call)
|
||||
header += "#define MAX_HEROPOWER %d\n" % len(hp)
|
||||
|
||||
out += "const char *race_beast[MAX_BEASTS] = {\n"
|
||||
for b in beasts:
|
||||
out += "\t\"%s\",\n" % b
|
||||
out += "};\n"
|
||||
|
||||
out += "const char *race_totems[MAX_TOTEMS] = {\n"
|
||||
for b in totems:
|
||||
out += "\t\"%s\",\n" % b
|
||||
out += "};\n"
|
||||
|
||||
out += "const char *totemic_call[MAX_TOTEMIC_CALL] = {\n"
|
||||
for b in totemic_call:
|
||||
out += "\t\"%s\",\n" % b
|
||||
out += "};\n"
|
||||
|
||||
out += "const char *hp_list[MAX_HEROPOWER] = {\n"
|
||||
for b in hp:
|
||||
out += "\t\"%s\",\n" % b
|
||||
out += "};\n"
|
||||
|
||||
f = open("../src/proto/ent.c", "w")
|
||||
f.write(out)
|
||||
f.close()
|
||||
|
||||
header += "const char *totemic_call[MAX_TOTEMIC_CALL];\n"
|
||||
header += "const char *race_beast[MAX_BEASTS];\n"
|
||||
header += "const char *race_totems[MAX_TOTEMS];\n"
|
||||
header += "\n#endif"
|
||||
f = open("../src/include/proto/ent_gen.h", "w")
|
||||
f.write(header)
|
||||
f.close()
|
||||
|
||||
if __name__ == '__main__':
|
||||
basic = parse("custom_mod")
|
||||
#classic = parse("cards/classic")
|
||||
|
||||
#e = basic + classic
|
||||
e = basic
|
||||
|
||||
gen(e)
|
||||
#gen_js_cards(e)
|
||||
#gen_js_hp(e)
|
||||
#gen_js_hero(e)
|
||||
print 'total entities: %d' % len(e)
|
||||
@@ -0,0 +1,188 @@
|
||||
MECHANICS_DAMAGE , 1000
|
||||
MECHANICS_HEALTH , 1000
|
||||
MECHANICS_ATTACK , 1000
|
||||
MECHANICS_ATTACK_DAMAGE, 1000
|
||||
MECHANICS_ATTACK_HEAL, 1000
|
||||
MECHANICS_HEROPOWER, 1000
|
||||
MECHANICS_BATTLECRY_TRIGGER , 1000
|
||||
MECHANICS_CHANGESIDES, 1000
|
||||
MECHANICS_ARMOR, 1000
|
||||
MECHANICS_DURABILITY, 1000
|
||||
MECHANICS_DETACH, 1000
|
||||
MECHANICS_SELECTED, 1000
|
||||
MECHANICS_DESTROY_WEAPON, 1000
|
||||
MECHANICS_TURN_TRIGGER, 1000
|
||||
MECHANICS_COST, 1000
|
||||
CARD_HAND , 1000
|
||||
CARD_DESTROYED , 1001
|
||||
CARD_BOARD , 1000
|
||||
CARD_EXHAUSTED , 1000
|
||||
CARD_HERO , 1000
|
||||
CARD_HEROPOWER , 1000
|
||||
CARD_HEROWEAPON, 1000
|
||||
CARD_BOSS, 1000
|
||||
CARD_TARGETING , 1000
|
||||
CARD_NONTARGET , 1000
|
||||
CARD_NONTARGET_BC , 1000
|
||||
CARD_SPELL , 1000
|
||||
CARD_SPELL_HEAL , 1000
|
||||
CARD_SPELL_DAMAGE , 1000
|
||||
CARD_HP_REINFORCE , 1000
|
||||
CARD_HP_DAGGERMASTERY , 1000
|
||||
CARD_HP_ARMORUP , 1000
|
||||
CARD_HP_LIFETAP , 1000
|
||||
CARD_HP_SHAPESHIFT , 1000
|
||||
CARD_WINDFURY , 1000
|
||||
CARD_DECK , 1000
|
||||
CARD_TARGET_HERO , 1000
|
||||
CARD_TARGET_MINIONS , 1000
|
||||
CARD_TARGET_ENEMY_HERO , 1000
|
||||
CARD_TARGET_ENEMY_MINIONS , 1000
|
||||
CARD_TARGET_ALLY_HERO , 1000
|
||||
CARD_TARGET_ALLY_MINIONS , 1000
|
||||
CARD_TARGET_ALLY, 1000
|
||||
CARD_TARGET_ENEMY, 1000
|
||||
CARD_TARGET_ALL, 1000
|
||||
CARD_HP_SPELL_DAMAGE , 1000
|
||||
CARD_INNERFIRE , 1000
|
||||
CARD_AOE_ENEMY_MINIONS , 1000
|
||||
CARD_AOE_ALLENEMY , 1000
|
||||
CARD_CHARGE , 1000
|
||||
CARD_DIVINE_SHIELD , 1000
|
||||
CARD_FREEZE , 1000
|
||||
CARD_FROZEN , 1000
|
||||
CARD_TARGET_FROZEN_4_DMG , 1000
|
||||
CARD_BATTLECRY , 1000
|
||||
CARD_BATTLECRY_DAMAGE3_ENEMY_HERO , 1000
|
||||
CARD_BATTLECRY_TARGET , 1000
|
||||
CARD_BATTLECRY_HEAL2_TARGET , 1000
|
||||
CARD_BATTLECRY_DRAW1_CARD, 1000
|
||||
CARD_DRAW2_CARD, 1000
|
||||
CARD_DRAW4_CARD, 1000
|
||||
CARD_DRAW_CARD, 1000
|
||||
CARD_MINION, 1000
|
||||
CARD_BUFF , 1000
|
||||
CARD_DIVINESPIRIT, 1000
|
||||
CARD_AOE, 1000
|
||||
CARD_AOE_TARGET_ALL, 1000
|
||||
CARD_HEAL_ALLIES, 1000
|
||||
CARD_BATTLECRY_DAMAGE1_ALL, 1000
|
||||
CARD_AOE_MINIONS, 1000
|
||||
CARD_SUMMON, 1000
|
||||
CARD_WEAPON_ROCKBITER, 1000
|
||||
CARD_WEAPON, 1000
|
||||
CARD_BOARD_WEAPON, 1000
|
||||
CARD_SUMMON_CS2_MIRROR, 1000
|
||||
CARD_BLESSING_OF_KINGS, 1000
|
||||
CARD_BLOODLUST, 1000
|
||||
CARD_BUFF_AOE, 1000
|
||||
CARD_CORRUPTION, 1000
|
||||
CARD_CORRUPTED, 1000
|
||||
CARD_ATTACHMENT, 1000
|
||||
CARD_RAID_LEADER, 1000
|
||||
CARD_AURA, 1000
|
||||
CARD_STORMWIND_CHAMPION, 1000
|
||||
CARD_RACE_BEAST, 1000
|
||||
CARD_RACE_MURLOC, 1000
|
||||
CARD_TAUNT, 1000
|
||||
CARD_SPELLPOWER, 1000
|
||||
CARD_SAP, 1000
|
||||
CARD_VANISH, 1000
|
||||
CARD_SUMMON_ANIMAL_COMPANION, 1000
|
||||
CARD_UNCOLLECTIBLE, 1000
|
||||
CARD_BATTLECRY_SUMMON_DRAGONLING_MECHANIC, 1000
|
||||
CARD_RACE_MECH, 1000
|
||||
CARD_LEOKK, 1000
|
||||
CARD_BATTLECRY_SUMMON_MURLOC_SCOUT, 1000
|
||||
CARD_BATTLECRY_SUMMON_BOAR, 1000
|
||||
CARD_BATTLECRY_SUMMON, 1000
|
||||
CARD_RACE_TOTEM, 1000
|
||||
CARD_RACE_DEMON, 1000
|
||||
CARD_TURN_HEAL1_MINIONS, 1000
|
||||
CARD_TOTEMIC_CALL_CHILD, 1000
|
||||
CARD_HP_TOTEMIC_CALL, 1000
|
||||
CARD_BATTLECRY_HEAL2_ALIES, 1000
|
||||
CARD_BATTLECRY_HEAL6_ALLY_HERO, 1000
|
||||
CARD_BATTLECRY_DAMAGE1_TARGET, 1000
|
||||
CARD_BATTLECRY_DAMAGE2_TARGET, 1000
|
||||
CARD_BATTLECRY_DAMAGE3_TARGET, 1000
|
||||
CARD_BATTLECRY_FROSTWOLF_WARLORD, 1000
|
||||
CARD_BATTLECRY_DISCARD1_CARD, 1000
|
||||
CARD_DISCARD, 1000
|
||||
CARD_MIND_CONTROL, 1000
|
||||
CARD_AOE_CLEAVE, 1000
|
||||
CARD_FAN_OF_KNIVES, 1000
|
||||
CARD_KILL_COMMAND, 1000
|
||||
CARD_MIND_VISION, 1000
|
||||
CARD_DAMAGE_DRAW_CARD, 1000
|
||||
CARD_SOULFIRE, 1000
|
||||
CARD_MORTAL_COIL, 1000
|
||||
CARD_DRAW1_CARD, 1000
|
||||
CARD_ARMOR5, 1000
|
||||
CARD_TRUESILVER_CHAMPION, 1000
|
||||
CARD_STARVING_BUZZARD, 1000
|
||||
CARD_SAVAGE_ROAR, 1000
|
||||
CARD_WARSONG_COMMANDER, 1000
|
||||
CARD_TIMBER_WOLF, 1000
|
||||
CARD_FLAMETONGUE_TOTEM, 1000
|
||||
CARD_GURU_BERSERKER, 1000
|
||||
CARD_CLAW, 1000
|
||||
CARD_MARK_OF_THE_WILD, 1000
|
||||
CARD_HUNTERS_MARK, 1000
|
||||
CARD_AOE_MULTISHOT, 1000
|
||||
CARD_ANCESTRAL_HEALING, 1000
|
||||
CARD_ROCKBITER_WEAPON, 1000
|
||||
CARD_DRAIN_LIFE, 1000
|
||||
CARD_SINISTER_STRIKE, 1000
|
||||
CARD_ASSASINATE, 1000
|
||||
CARD_MIND_BLAST, 1000
|
||||
CARD_HAND_OF_PROTECTION, 1000
|
||||
CARD_CHARGE_BUFF, 1000
|
||||
CARD_HEROIC_STRIKE, 1000
|
||||
CARD_EXECUTE, 1000
|
||||
CARD_SHADOW_WORD_DEATH, 1000
|
||||
CARD_SHADOW_WORD_PAIN, 1000
|
||||
CARD_SACRIFITIAL_PACT, 1000
|
||||
CARD_BATTLECRY_DESTROY_ENEMY_WEAPON, 1000
|
||||
CARD_POWER_WORD_SHIELD, 1000
|
||||
CARD_SWIPE, 1000
|
||||
CARD_ARCANE_MISSILES, 1000
|
||||
CARD_TRACKING, 1000
|
||||
CARD_TRANSFORM, 1000
|
||||
CARD_POLYMORPH, 1000
|
||||
CARD_HIDE, 1000
|
||||
CARD_LINKED, 1000
|
||||
CARD_HEX, 1000
|
||||
CARD_TARGET_UNDAMAGED_MINION, 1000
|
||||
CARD_TARGET_DAMAGED_MINION, 1000
|
||||
CARD_TARGET_3ATTACK_LESS, 1000
|
||||
CARD_TARGET_5ATTACK_MORE, 1000
|
||||
CARD_TARGET_30PERCENT_LESS, 1000
|
||||
CARD_TARGET_DEMON, 1000
|
||||
CARD_BLESSING_OF_MIGHT, 1000
|
||||
CARD_TARGET_UNDAMAGED, 1000
|
||||
CARD_ARCHMAGE_ANTONIDAS, 1000
|
||||
CARD_TARGET_BC_AUTO, 1000
|
||||
CARD_TARGET_BC_MANUAL, 1000
|
||||
CARD_TARGET_BC_ALL, 1000
|
||||
CARD_TARGETING_BC, 1000
|
||||
CARD_TARGET_BC_ALLY, 1000
|
||||
CARD_TARGET_BC_ENEMY, 1000
|
||||
CARD_TARGET_BC_ENEMY_MINIONS, 1000
|
||||
CARD_TARGET_BC_HERO, 1000
|
||||
CARD_TARGET_BC_ENEMY_HERO, 1000
|
||||
CARD_TARGET_BC_MINIONS, 1000
|
||||
CARD_TARGET_BC_ALLY_MINIONS, 1000
|
||||
CARD_TARGET_BC_ALLY_HERO, 1000
|
||||
CARD_STEALTH, 1000
|
||||
CARD_ATTACK, 1000
|
||||
CARD_TARGET_URSA, 1000
|
||||
CARD_TARGET_SVEN, 1000
|
||||
CARD_LEVELUP, 1000
|
||||
CARD_PIERCE_MAGIC_IMMUNITY, 1000
|
||||
CARD_TARGET_ALLY_BOARD, 1000
|
||||
CARD_TARGET_BOARD, 1000
|
||||
CARD_TARGET_ENEMY_BOARD, 1000
|
||||
CARD_TARGET_ALLY_BOSSES, 1000
|
||||
CARD_TARGET_ENEMY_BOSSES, 1000
|
||||
CARD_TARGET_BOSSES, 1000
|
||||
@@ -0,0 +1,67 @@
|
||||
'''
|
||||
hm_gameserver - hearthmod gameserver
|
||||
Copyright (C) 2016 Filip Pancik
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
'''
|
||||
import os
|
||||
|
||||
def fwrite(f, content):
|
||||
f = open(f, "w")
|
||||
f.write(content)
|
||||
f.close()
|
||||
|
||||
def parse():
|
||||
f = open("./flags", "r")
|
||||
lines = f.readlines();
|
||||
f.close()
|
||||
|
||||
f = open("./flags_sections", "r")
|
||||
lines = lines + f.readlines()
|
||||
f.close()
|
||||
|
||||
ae = []
|
||||
for l in lines:
|
||||
|
||||
elements = []
|
||||
for ele in l.split(","):
|
||||
elements.append(ele.replace(" ", "").replace("\n", ""))
|
||||
|
||||
ae.append(elements)
|
||||
|
||||
header = '#ifndef FLAG_DEF_H_\n#define FLAG_DEF_H_\n\n'
|
||||
|
||||
header += '#define MAX_FLAGS_DEF %d\n\n' % len(ae)
|
||||
header += 'int flag_defs[MAX_FLAGS_DEF];\n'
|
||||
header += 'enum flags_e {\n'
|
||||
i = 0
|
||||
for a in ae:
|
||||
header += '\t%s = %s,\n' % (a[0], i)
|
||||
i = i + 1
|
||||
header += '};\n'
|
||||
header += '#endif'
|
||||
|
||||
body = '#include <flag_def.h>\n\n'
|
||||
body += 'int flag_defs[MAX_FLAGS_DEF] = {\n'
|
||||
i = 0
|
||||
for a in ae:
|
||||
body += '%d, // index %d\n' % (int(a[1]), i)
|
||||
i = i + 1
|
||||
body += '};\n'
|
||||
|
||||
fwrite("../src/include/flag_def.h", header)
|
||||
fwrite("../src/flag_def.c", body)
|
||||
|
||||
if __name__ == '__main__':
|
||||
e = parse()
|
||||
@@ -0,0 +1,18 @@
|
||||
@section
|
||||
buff:code,target
|
||||
battlecry:code,target
|
||||
defender:code
|
||||
properties:all,levelup
|
||||
spell_aoe:code,target
|
||||
spell:code,target
|
||||
attack:code,target
|
||||
attack_effect:code
|
||||
weapon:code
|
||||
endturn:code
|
||||
onboard:code
|
||||
destroyed:code
|
||||
weapon_destroyed:code
|
||||
idle:code
|
||||
weapon_attack:code
|
||||
attachment_attack:code
|
||||
attack_effect_attachment:code
|
||||
@@ -0,0 +1,14 @@
|
||||
# Goldshire Footman
|
||||
{
|
||||
".section attack" : {
|
||||
"code" : "
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target" : "$minions"
|
||||
},
|
||||
|
||||
".section properties" : {
|
||||
"all": [ "taunt" ]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
# Holy Nova
|
||||
{
|
||||
".section spell_aoe" : {
|
||||
"code" : "
|
||||
def(card_list_s, allcards)
|
||||
allcards = hsl_board_all_cards($attacker, $heroes_included);
|
||||
|
||||
def(card_list_s, cl)
|
||||
foreach(cl, allcards) {
|
||||
if(cl->card->controller == $attacker->controller) {
|
||||
cl->card->receive.heal = 2;
|
||||
} else {
|
||||
cl->card->receive.damage = 2;
|
||||
}
|
||||
}
|
||||
|
||||
hsl_attack_aoe($attacker, allcards)
|
||||
|
||||
hsl_link_target($attacker, allcards)
|
||||
",
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
# Holy Smite
|
||||
{
|
||||
".section spell" : {
|
||||
"code" : "
|
||||
$defender->receive.damage = 2;
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target": "$all"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
# Mind Vision
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
def(card_s, card)
|
||||
card = hsl_cards_get_hand_random($deck_opponent);
|
||||
if(card) {
|
||||
hsl_add_new_card_hand($deck_player, card->entity->name, holder)
|
||||
}
|
||||
",
|
||||
"target" : "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
# Power Word: Shield
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
hsl_change_health($defender, 2)
|
||||
hsl_add_signle_attachment($player, $deck_player, $attacker, $defender);
|
||||
|
||||
hsl_draw_cards($player, $deck_player, draw_card, 1)
|
||||
|
||||
/* hsl_link_target($attacker, $defenders) */
|
||||
",
|
||||
|
||||
"target": "$minions"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
# Claw
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
int change = 2;
|
||||
hsl_buff_attack_expire(1, $ally_hero, change);
|
||||
hsl_change_armor($ally_hero, change)
|
||||
hsl_add_attachment($player, $attacker, $ally_hero, 1);
|
||||
hsl_add_target($ally_hero, holder)
|
||||
",
|
||||
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
# Healing Touch
|
||||
{
|
||||
".section buff" : {
|
||||
"code" : "
|
||||
$defender->receive.heal = 8;
|
||||
hsl_attack($attacker, $defenders);
|
||||
hsl_link_target($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target": "$all"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
# Moonfire
|
||||
{
|
||||
".section spell" : {
|
||||
"code" : "
|
||||
/* defender is linked by default */
|
||||
$defender->receive.damage = 1;
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target": "$all"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
# Mark of the Wild
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
hsl_change_attack($defender, 2)
|
||||
hsl_set_taunt($defender)
|
||||
hsl_add_signle_attachment($player, $deck_player, $attacker, $defender);
|
||||
",
|
||||
|
||||
"target": "$minions"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
# Savage Roar
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
def(card_list_s, all)
|
||||
all = hsl_board_friendly_cards($attacker, $heroes_included);
|
||||
|
||||
def(card_list_s, itm)
|
||||
foreach(itm, all) {
|
||||
hsl_buff_attack_expire(1, itm->card, 2);
|
||||
hsl_add_attachment($player, $attacker, itm->card, 1);
|
||||
hsl_add_defender(itm->card, holder)
|
||||
}
|
||||
",
|
||||
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
# Swipe
|
||||
{
|
||||
".section spell_aoe" : {
|
||||
"code": "
|
||||
def(card_list_s, all)
|
||||
all = hsl_board_enemy_cards($defender, $heroes_included);
|
||||
$defender->receive.damage = 4;
|
||||
|
||||
def(card_list_s, itm)
|
||||
foreach(itm, all) {
|
||||
itm->card->receive.damage = 1;
|
||||
hsl_add_target(itm->card, holder);
|
||||
}
|
||||
|
||||
hsl_attack($attacker, $defenders)
|
||||
",
|
||||
|
||||
"target": "$enemy"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Polymorph
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
hsl_transform($attacker, $defender, \"CS2_tk1\");
|
||||
",
|
||||
|
||||
"target": "$enemy_minions"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
# Arcane Intellect
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
hsl_draw_cards($player, $deck_player, draw_card, 2)
|
||||
",
|
||||
"target" : "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
# Frostbolt
|
||||
{
|
||||
".section spell" : {
|
||||
"code" : "
|
||||
$defender->receive.damage = 3;
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target": "$all"
|
||||
},
|
||||
|
||||
".section attack_effect" : {
|
||||
"code" : "
|
||||
hsl_freeze($attacker, $defender)
|
||||
"
|
||||
},
|
||||
|
||||
".section properties" : {
|
||||
"all": [ "freeze" ]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Arcane Explosion
|
||||
{
|
||||
".section spell_aoe" : {
|
||||
"code" : "
|
||||
def(card_list_s, e)
|
||||
e = hsl_board_enemy_cards($attacker, $heroes_excluded);
|
||||
|
||||
def(card_list_s, cl)
|
||||
foreach(cl, e) {
|
||||
cl->card->receive.damage = 1;
|
||||
}
|
||||
|
||||
hsl_attack_aoe($attacker, e)
|
||||
hsl_link_target($attacker, e)
|
||||
",
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
# Frost Nova
|
||||
{
|
||||
".section spell_aoe" : {
|
||||
"code" : "
|
||||
def(card_list_s, e)
|
||||
e = hsl_board_enemy_cards($attacker, $heroes_excluded);
|
||||
|
||||
hsl_attack_aoe($attacker, e)
|
||||
hsl_link_target($attacker, e)
|
||||
",
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Mirror Image
|
||||
{
|
||||
".section spell_aoe" : {
|
||||
"code": "
|
||||
int i;
|
||||
for(i = 0; i < 2; i++) {
|
||||
hsl_summon_card($deck_player, \"CS2_mirror\", cardholder)
|
||||
}
|
||||
|
||||
/* this just does the routine (destroying it etc..) with a played card */
|
||||
hsl_attack_aoe($attacker, $defenders)
|
||||
",
|
||||
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# Fireball
|
||||
{
|
||||
".section spell" : {
|
||||
"code" : "
|
||||
$defender->receive.damage = 6;
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target": "$all"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Flamestrike
|
||||
{
|
||||
".section spell_aoe" : {
|
||||
"code" : "
|
||||
def(card_list_s, e)
|
||||
e = hsl_board_enemy_cards($attacker, $heroes_excluded);
|
||||
|
||||
def(card_list_s, cl)
|
||||
foreach(cl, e) {
|
||||
cl->card->receive.damage = 4;
|
||||
}
|
||||
|
||||
hsl_attack_aoe($attacker, e)
|
||||
hsl_link_target($attacker, e)
|
||||
",
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# Water Elemental
|
||||
{
|
||||
".section attack" : {
|
||||
"code" : "
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target" : "$minions"
|
||||
},
|
||||
|
||||
".section attack_effect" : {
|
||||
"code" : "
|
||||
hsl_freeze($attacker, $defender)
|
||||
"
|
||||
},
|
||||
|
||||
".section properties" : {
|
||||
"all": [ "freeze" ]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# Frost Shock
|
||||
{
|
||||
".section spell" : {
|
||||
"code" : "
|
||||
$defender->receive.damage = 1;
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target": "$all"
|
||||
},
|
||||
|
||||
".section attack_effect" : {
|
||||
"code" : "
|
||||
hsl_freeze($attacker, $defender)
|
||||
"
|
||||
},
|
||||
|
||||
".section properties" : {
|
||||
"all": [ "freeze" ]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Windfury
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
setflag($defender, CARD_WINDFURY)
|
||||
",
|
||||
|
||||
"target": "$minions"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
# Ancestral Healing
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
hsl_set_fullhealth($defender)
|
||||
hsl_set_taunt($defender)
|
||||
",
|
||||
|
||||
"target": "$minions"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# Fire Elemental
|
||||
{
|
||||
".section battlecry" : {
|
||||
"code" : "
|
||||
def(card_s, def)
|
||||
def = hsl_card($target);
|
||||
if(def) {
|
||||
hsl_attack_bc($attacker, def, 3)
|
||||
}
|
||||
",
|
||||
|
||||
"target": "$all"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
# Rockbiter Weapon
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
hsl_buff_attack_expire(1, $defender, 3);
|
||||
hsl_add_attachment($player, $attacker, $defender, 1);
|
||||
",
|
||||
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Bloodlust
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
def(card_list_s, all)
|
||||
all = hsl_board_friendly_cards($attacker, $heroes_excluded)
|
||||
|
||||
def(card_list_s, itm)
|
||||
foreach(itm, all) {
|
||||
hsl_buff_attack_expire(1, itm->card, 3);
|
||||
hsl_add_attachment($player, $attacker, itm->card, 1);
|
||||
}
|
||||
",
|
||||
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
# Shadow Bolt
|
||||
{
|
||||
".section spell" : {
|
||||
"code" : "
|
||||
$defender->receive.damage = 4;
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target": "$minions"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
# Drain Life
|
||||
{
|
||||
".section spell_aoe" : {
|
||||
"code": "
|
||||
hsl_receive_damage($defender, 2);
|
||||
|
||||
hsl_receive_heal($ally_hero, 2);
|
||||
hsl_add_target($ally_hero, holder);
|
||||
|
||||
hsl_attack($attacker, $defenders)
|
||||
",
|
||||
|
||||
"target": "$enemy"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Hellfire
|
||||
{
|
||||
".section spell_aoe" : {
|
||||
"code" : "
|
||||
def(card_list_s, allcards)
|
||||
allcards = hsl_board_all_cards($attacker, $heroes_included);
|
||||
|
||||
def(card_list_s, cl)
|
||||
foreach(cl, allcards) {
|
||||
cl->card->receive.damage = 3;
|
||||
}
|
||||
|
||||
hsl_attack_aoe($attacker, allcards)
|
||||
|
||||
hsl_link_target($attacker, allcards)
|
||||
",
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Corruption
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
hsl_buff_corrupt_expire(2, $defender);
|
||||
hsl_add_attachment($player, $attacker, $defender, 2);
|
||||
",
|
||||
|
||||
"target": "$minions"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
# Dread Infernal
|
||||
{
|
||||
".section battlecry" : {
|
||||
"code" : "
|
||||
def(card_list_s, allcards)
|
||||
allcards = hsl_board_all_cards($attacker, $heroes_included);
|
||||
|
||||
def(card_list_s, cl)
|
||||
foreach(cl, allcards) {
|
||||
cl->card->receive.damage = 1;
|
||||
}
|
||||
|
||||
hsl_attack_aoe(attacker, allcards)
|
||||
|
||||
hsl_link_target(attacker, allcards)
|
||||
",
|
||||
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
# Voidwalker
|
||||
{
|
||||
".section attack" : {
|
||||
"code" : "
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target" : "$minions"
|
||||
},
|
||||
|
||||
".section properties" : {
|
||||
"all": [ "taunt" ]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Backstab
|
||||
{
|
||||
".section spell" : {
|
||||
"code" : "
|
||||
hsl_receive_damage($defender, 2);
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target": "$undamaged_minions"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
# Sinister Strike
|
||||
{
|
||||
".section battlecry" : {
|
||||
"code" : "
|
||||
hsl_attack_bc($attacker, $enemy_hero, 3)
|
||||
",
|
||||
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Assassinate
|
||||
{
|
||||
".section buff" : {
|
||||
"code" : "
|
||||
hsl_destroy($defender);
|
||||
",
|
||||
|
||||
"target": "$enemy_minions"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
# Sprint
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
hsl_draw_cards($player, $deck_player, draw_card, 4)
|
||||
",
|
||||
"target" : "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
# Assassin's Blade
|
||||
{
|
||||
".section weapon" : {
|
||||
"code" : "
|
||||
hsl_give_weapon($deck_player);
|
||||
"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Wicked Knife
|
||||
{
|
||||
".section weapon" : {
|
||||
"code" : "
|
||||
hsl_give_weapon($deck_player);
|
||||
"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
# Blessing of Might
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
hsl_change_attack($defender, 3)
|
||||
hsl_add_signle_attachment($player, $deck_player, $attacker, $defender);
|
||||
",
|
||||
|
||||
"target": "$minions"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Guardian of Kings
|
||||
{
|
||||
".section battlecry" : {
|
||||
"code" : "
|
||||
hsl_heal($attacker, $ally_hero, 6)
|
||||
",
|
||||
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
# Holy Light
|
||||
{
|
||||
".section buff" : {
|
||||
"code" : "
|
||||
$defender->receive.heal = 6;
|
||||
hsl_attack($attacker, $defenders);
|
||||
hsl_link_target($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target": "$all"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Light's Justice
|
||||
{
|
||||
".section weapon" : {
|
||||
"code" : "
|
||||
hsl_give_weapon($deck_player);
|
||||
"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# Blessing of Kings
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
hsl_change_attack($defender, 4)
|
||||
hsl_change_health($defender, 4)
|
||||
hsl_add_signle_attachment($player, $deck_player, $attacker, $defender);
|
||||
",
|
||||
|
||||
"target": "$minions"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
# Consecration
|
||||
{
|
||||
".section spell_aoe" : {
|
||||
"code" : "
|
||||
def(card_list_s, e)
|
||||
e = hsl_board_enemy_cards($attacker, $heroes_included);
|
||||
|
||||
def(card_list_s, cl)
|
||||
foreach(cl, e) {
|
||||
cl->card->receive.damage = 2;
|
||||
}
|
||||
|
||||
hsl_attack_aoe($attacker, e)
|
||||
hsl_link_target($attacker, e)
|
||||
",
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
# Hammer of Wrath
|
||||
{
|
||||
".section spell" : {
|
||||
"code" : "
|
||||
$defender->receive.damage = 3;
|
||||
hsl_attack($attacker, $defenders);
|
||||
|
||||
hsl_draw_cards($player, $deck_player, draw_card, 1)
|
||||
",
|
||||
|
||||
"target": "$all"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
# Heroic Strike
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
hsl_buff_attack_expire(1, $ally_hero, 4);
|
||||
hsl_add_attachment($player, $attacker, $ally_hero, 1);
|
||||
|
||||
",
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
# Fiery War Axe
|
||||
{
|
||||
".section weapon" : {
|
||||
"code" : "
|
||||
hsl_give_weapon($deck_player);
|
||||
"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
# Execute
|
||||
{
|
||||
".section buff" : {
|
||||
"code" : "
|
||||
hsl_destroy($defender);
|
||||
",
|
||||
|
||||
"target": "$damaged_minions"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
# Arcanite Reaper
|
||||
{
|
||||
".section weapon" : {
|
||||
"code" : "
|
||||
hsl_give_weapon($deck_player);
|
||||
"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Magma Rager
|
||||
{
|
||||
".section attack" : {
|
||||
"code" : "
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target" : "$enemy_minions"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
# Ironforge Rifleman
|
||||
{
|
||||
".section battlecry" : {
|
||||
"code" : "
|
||||
def(card_s, def)
|
||||
def = hsl_card($target);
|
||||
if(def) {
|
||||
hsl_attack_bc($attacker, def, 1)
|
||||
}
|
||||
",
|
||||
|
||||
"target": "$all"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
# Kobold Geomancer
|
||||
{
|
||||
".section attack" : {
|
||||
"code" : "
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target" : "$enemy_minions"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Bloodfen Raptor
|
||||
{
|
||||
".section attack" : {
|
||||
"code" : "
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target" : "$enemy_minions"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
# Razorfen Hunter
|
||||
{
|
||||
".section battlecry" : {
|
||||
"code" : "
|
||||
hsl_summon_card($deck_player, \"CS2_boar\", cardholder)
|
||||
",
|
||||
|
||||
"target" : "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
# Stormwind Champion
|
||||
{
|
||||
".section attack" : {
|
||||
"code" : "
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target" : "$enemy_minions"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# Frostwolf Warlord
|
||||
{
|
||||
".section battlecry" : {
|
||||
"code" : "
|
||||
int num_minions = hsl_board_minions_count($deck_player, $attacker);
|
||||
if(num_minions > 0) {
|
||||
hsl_change_health($attacker, num_minions)
|
||||
hsl_change_attack($attacker, num_minions)
|
||||
|
||||
hsl_add_signle_attachment($player, $deck_player, $attacker, $attacker);
|
||||
}
|
||||
",
|
||||
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
# Shadow Word: Pain
|
||||
{
|
||||
".section buff" : {
|
||||
"code" : "
|
||||
hsl_destroy($defender);
|
||||
",
|
||||
|
||||
"target": "$attack3less_minions"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
# Divine Spirit
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
buff_health($defender, $defender->health * 2);
|
||||
",
|
||||
|
||||
"target": "$minions"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
# Mirror Image
|
||||
{
|
||||
".section attack" : {
|
||||
"code" : "
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target" : "$minions"
|
||||
},
|
||||
|
||||
".section properties" : {
|
||||
"all": [ "taunt" ]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
# Sheep
|
||||
{
|
||||
".section attack" : {
|
||||
"code" : "
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target" : "$minions"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
# Darkscale Healer
|
||||
{
|
||||
".section battlecry" : {
|
||||
"code" : "
|
||||
def(card_list_s, allcards)
|
||||
allcards = hsl_board_friendly_cards($attacker, $heroes_included);
|
||||
|
||||
def(card_list_s, cl)
|
||||
foreach(cl, allcards) {
|
||||
cl->card->receive.heal = 2;
|
||||
}
|
||||
|
||||
hsl_attack_aoe(attacker, allcards)
|
||||
|
||||
hsl_link_target(attacker, allcards)
|
||||
",
|
||||
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
# Novice Engineer
|
||||
{
|
||||
".section battlecry" : {
|
||||
"code" : "
|
||||
hsl_draw_cards($player, $deck_player, draw_card, 1)
|
||||
",
|
||||
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
# Scarlet Crusader
|
||||
{
|
||||
".section attack" : {
|
||||
"code" : "
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target" : "$enemy_minions"
|
||||
},
|
||||
|
||||
".section properties" : {
|
||||
"all": [ "divine_shield" ]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
# Dragonling Mechanic
|
||||
{
|
||||
".section battlecry" : {
|
||||
"code" : "
|
||||
hsl_summon_card($deck_player, \"EX1_025t\", cardholder)
|
||||
",
|
||||
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
# Acidic Swamp Ooze
|
||||
{
|
||||
".section battlecry" : {
|
||||
"code" : "
|
||||
hsl_destroy_weapon($attacker, $player, holder)
|
||||
",
|
||||
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
# Hex
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
hsl_transform($attacker, $defender, \"hexfrog\");
|
||||
",
|
||||
|
||||
"target": "$enemy_minions"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Succubus
|
||||
{
|
||||
".section battlecry" : {
|
||||
"code" : "
|
||||
hsl_discard_random_hand($deck_player, 1, holder)
|
||||
",
|
||||
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
# Whirlwind
|
||||
{
|
||||
".section spell_aoe" : {
|
||||
"code" : "
|
||||
def(card_list_s, e)
|
||||
e = hsl_board_enemy_cards($attacker, $heroes_excluded);
|
||||
|
||||
def(card_list_s, cl)
|
||||
foreach(cl, e) {
|
||||
cl->card->receive.damage = 1;
|
||||
}
|
||||
|
||||
hsl_attack_aoe($attacker, e)
|
||||
hsl_link_target($attacker, e)
|
||||
",
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
# Murloc Tidehunter
|
||||
{
|
||||
".section battlecry" : {
|
||||
"code" : "
|
||||
hsl_summon_card($deck_player, \"EX1_506a\", cardholder)
|
||||
",
|
||||
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
# Sap
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
unsetflag($defender, CARD_BOARD)
|
||||
setflag($defender, CARD_HAND)
|
||||
|
||||
$defender->zone_position = ++($deck_opponent->handposition);
|
||||
",
|
||||
|
||||
"target": "$enemy_minions"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
# Sinister Strike
|
||||
{
|
||||
".section battlecry" : {
|
||||
"code" : "
|
||||
hsl_attack_bc($attacker, $enemy_hero, 3)
|
||||
",
|
||||
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
# Shield Block
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
hsl_change_armor($ally_hero, 5);
|
||||
hsl_add_target($ally_hero, holder);
|
||||
hsl_draw_cards($player, $deck_player, draw_card, 1)
|
||||
",
|
||||
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
# Illidan
|
||||
{
|
||||
".section attack" : {
|
||||
"code" : "
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target" : "$enemy_minions"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Shadow Word: Death
|
||||
{
|
||||
".section buff" : {
|
||||
"code" : "
|
||||
hsl_destroy($defender);
|
||||
",
|
||||
|
||||
"target": "$attack5more_minions"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# HERO_01
|
||||
{
|
||||
".section attack" : {
|
||||
"code" : "
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target" : "$all"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
# HERO_03
|
||||
{
|
||||
".section attack" : {
|
||||
"code" : "
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target" : "$all"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
# Sacrificial Pact
|
||||
{
|
||||
".section spell_aoe" : {
|
||||
"code": "
|
||||
hsl_destroy($defender);
|
||||
|
||||
hsl_receive_heal($ally_hero, 5);
|
||||
hsl_add_target($ally_hero, holder);
|
||||
|
||||
hsl_attack($attacker, $defenders)
|
||||
",
|
||||
|
||||
"target": "$demon"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# Vanish
|
||||
{
|
||||
".section buff" : {
|
||||
"code": "
|
||||
/*
|
||||
def(card_list_s, itm)
|
||||
foreach(itm, $defenders) {
|
||||
unsetflag(itm->card, CARD_BOARD)
|
||||
setflag(itm->card, CARD_HAND)
|
||||
|
||||
if(controller_player(itm->card)) {
|
||||
itm->card->zone_position = ++($deck_player->handposition);
|
||||
} else {
|
||||
itm->card->zone_position = ++($deck_opponent->handposition);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
",
|
||||
"target": "$auto"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
# Healing Totem
|
||||
{
|
||||
".section endturn" : {
|
||||
"code" : "
|
||||
def(card_list_s, all);
|
||||
all = hsl_board_friendly_cards_wattacker($heroes_excluded);
|
||||
|
||||
def(card_s, found);
|
||||
|
||||
def(card_list_s, c);
|
||||
foreach(c, all) {
|
||||
if(hsl_cmp_cardname(c, \"NEW1_009\")) {
|
||||
found = c->card;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(found != NULL) {
|
||||
def(card_list_s, filter);
|
||||
filter = hsl_board_friendly_cards(found, $heroes_excluded);
|
||||
|
||||
foreach(c, filter) {
|
||||
/* exclude self */
|
||||
if(c->card == found) continue;
|
||||
|
||||
hsl_receive_heal(c->card, 1);
|
||||
entity_attack(p, found, c->card);
|
||||
}
|
||||
|
||||
found->target.card = all;
|
||||
|
||||
flag(&found->state, MECHANICS_TURN_TRIGGER, FLAG_SET);
|
||||
}
|
||||
"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Kor'kron Elite
|
||||
{
|
||||
".section battlecry" : {
|
||||
"code" : "
|
||||
def(card_s, def)
|
||||
def = hsl_card($target);
|
||||
if(def) {
|
||||
hsl_attack_bc($attacker, def, 1)
|
||||
}
|
||||
",
|
||||
|
||||
"target": "$auto"
|
||||
},
|
||||
|
||||
".section defender" : {
|
||||
"code" : "
|
||||
hsl_add_new_card_hand($deck_opponent, \"CS2_boar\", holder)
|
||||
"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
# Misha
|
||||
{
|
||||
".section attack" : {
|
||||
"code" : "
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target" : "$enemy_minions"
|
||||
},
|
||||
|
||||
".section properties" : {
|
||||
"all": [ "taunt" ]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
# Huffer
|
||||
{
|
||||
".section attack" : {
|
||||
"code" : "
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target" : "$enemy_minions"
|
||||
},
|
||||
|
||||
".section properties" : {
|
||||
"all": [ "charge" ]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
# Hex
|
||||
{
|
||||
".section attack" : {
|
||||
"code" : "
|
||||
hsl_attack($attacker, $defenders);
|
||||
",
|
||||
|
||||
"target" : "$minions"
|
||||
},
|
||||
|
||||
".section properties" : {
|
||||
"all": [ "taunt" ]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
'''
|
||||
hm_gameserver - hearthmod gameserver
|
||||
Copyright (C) 2016 Filip Pancik
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
'''
|
||||
RF_SECTION = 1
|
||||
|
||||
no_levelup = 0
|
||||
|
||||
file_entities = "../../src/proto/ent.c"
|
||||
file_flags_sections = "../flags_sections"
|
||||
file_ent_sections = "../../src/proto/ent_sections.c"
|
||||
file_levelup_c = "../../src/levelup.c"
|
||||
file_levelup_h = "../../src/include/levelup.h"
|
||||
|
||||
sections = {
|
||||
"buff": ["./include/section_buff.h", "BUFF", []],
|
||||
"battlecry": ["./include/section_battlecry.h", "BATTLECRY", []],
|
||||
"defender": ["./include/section_defender.h", "DEFENDER", []],
|
||||
"spell_aoe": ["./include/section_spell_aoe.h", "SPELL_AOE", []],
|
||||
"spell": ["./include/section_spell.h", "SPELL", []],
|
||||
"attack": ["./include/section_attack.h", "ATTACK", []],
|
||||
"attack_effect": ["./include/section_attack_effect.h", "ATTACK_EFFECT", []],
|
||||
"weapon": ["./include/section_weapon.h", "WEAPON", []],
|
||||
"endturn": ["./include/section_endturn.h", "ENDTURN", []],
|
||||
"onboard": ["./include/section_onboard.h", "ONBOARD", []],
|
||||
"destroyed": ["./include/section_destroyed.h", "DESTROYED", []],
|
||||
"weapon_destroyed": ["./include/section_weapon_destroyed.h", "WEAPON_DESTROYED", []],
|
||||
"idle": ["./include/section_idle.h", "IDLE", []],
|
||||
"weapon_attack": ["./include/section_weapon_attack.h", "WEAPON_ATTACK", []],
|
||||
"attachment_attack": ["./include/section_attachment_attack.h", "ATTACHMENT_ATTACK", []],
|
||||
"attack_effect_attachment": ["./include/section_attack_effect_attachment.h", "ATTACK_EFFECT_ATTACHMENT", []],
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
@globals
|
||||
$player, $opponent
|
||||
$player_deck, $opponent_deck
|
||||
$none, $all, $minions, $enemy_minions, $enemy_hero, $enemies, $ally_minions, $ally_hero, $allies, $aoe
|
||||
#.random: $r_all, $r_enemy_minions, $r_enemies, $r_ally_minions, $r_allies
|
||||
$zone_play, $zone_deck, $zone_hand, $zone_graveyard, $zone_discard, $zone_setaside, $zone_secret
|
||||
$attacker, $defenders, $turn
|
||||
|
||||
@functions
|
||||
struct card_s *draw_card(dst, name, amount)
|
||||
void buff_attack_expire(round, defender, attack)
|
||||
void add_attachment(player)
|
||||
@@ -0,0 +1,101 @@
|
||||
'''
|
||||
hm_gameserver - hearthmod gameserver
|
||||
Copyright (C) 2016 Filip Pancik
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
'''
|
||||
import os
|
||||
from couchbase.bucket import Bucket
|
||||
|
||||
import config, util, target, parser
|
||||
|
||||
def start_sections():
|
||||
os.system("rm %s" % config.file_flags_sections)
|
||||
|
||||
util.write(config.file_ent_sections, "#include <ent_gen.h>\n#include <ent.h>\n\n", "w")
|
||||
util.write(config.file_ent_sections, "void entities_init2() {\n", "a")
|
||||
|
||||
print 'Starting sections:'
|
||||
for s in config.sections:
|
||||
b = "#ifndef SECTION_%s_H_\n" % config.sections[s][1].upper()
|
||||
b += "#define SECTION_%s_H_\n\n" % config.sections[s][1].upper()
|
||||
util.write(config.sections[s][0], b, "w")
|
||||
print '\t%s' % config.sections[s][0]
|
||||
|
||||
util.write(config.file_levelup_c, "#include <hsl_cardname.h>\n#include <levelup.h>\n\nstruct levelup_s levelup[MAX_LEVELUP] = {\n", "w")
|
||||
|
||||
def end_sections():
|
||||
print 'Ending sections:'
|
||||
for s in config.sections:
|
||||
b = '#define __SECTION_%s\\\n' % s.upper()
|
||||
for t in config.sections[s][2]:
|
||||
b += '\t%s\\\n' % t
|
||||
|
||||
util.write(config.sections[s][0], b, "a")
|
||||
b = "\n#endif"
|
||||
util.write(config.sections[s][0], b, "a")
|
||||
|
||||
print '\t%s' % config.sections[s][0]
|
||||
|
||||
util.write(config.file_ent_sections, "}\n", "a")
|
||||
|
||||
util.write(config.file_levelup_c, "};", "a")
|
||||
|
||||
lh = "#ifndef LEVELUP_H_\n#define LEVELUP_H_\n\
|
||||
#define MAX_LEVELUP %d\n\
|
||||
struct levelup_s {\n\
|
||||
const char *dst;\n\
|
||||
const char *src;\n\
|
||||
};\n\
|
||||
extern struct levelup_s levelup[MAX_LEVELUP];\n\
|
||||
#endif" % config.no_levelup
|
||||
util.write(config.file_levelup_h, lh, "w")
|
||||
|
||||
if __name__ == "__main__":
|
||||
start_sections()
|
||||
|
||||
rootDir = './cards/'
|
||||
|
||||
p = parser.parser()
|
||||
|
||||
cb = Bucket('couchbase://localhost/hbs', password='aci')
|
||||
loaded = cb.get('u:mod_dota').value
|
||||
|
||||
|
||||
for c in loaded['cards']:
|
||||
name = ''
|
||||
for k in c:
|
||||
if k[0] == '__name':
|
||||
name = k[1]
|
||||
if k[0] == '__code': # code comes later than name
|
||||
p.parse_card(k[1], name)
|
||||
|
||||
'''
|
||||
for c in loaded:
|
||||
for r in loaded[c]:
|
||||
for i in loaded[c][r]:
|
||||
print i
|
||||
|
||||
# files
|
||||
for dir_, dirnames, files in os.walk(rootDir):
|
||||
dirnames.sort()
|
||||
files.sort()
|
||||
for fileName in files:
|
||||
if(fileName.endswith(".card")):
|
||||
relDir = os.path.relpath(dir_, rootDir)
|
||||
relFile = os.path.join(relDir, fileName)
|
||||
p.parse_card(rootDir + relFile)
|
||||
'''
|
||||
|
||||
end_sections()
|
||||
@@ -0,0 +1,303 @@
|
||||
'''
|
||||
hm_gameserver - hearthmod gameserver
|
||||
Copyright (C) 2016 Filip Pancik
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
'''
|
||||
import json, re
|
||||
|
||||
import util, target, config
|
||||
|
||||
class parser:
|
||||
def __init__(self):
|
||||
self.allowed = self.allowed_sections()
|
||||
|
||||
def allowed_sections(self):
|
||||
loaded = util.read("allowed", 0)
|
||||
|
||||
read = 0
|
||||
al = {}
|
||||
|
||||
for a in loaded:
|
||||
if a.startswith('#'):
|
||||
continue
|
||||
elif a.startswith('@'):
|
||||
if(a.find('section') > -1):
|
||||
read |= config.RF_SECTION
|
||||
continue
|
||||
elif a.startswith('\n'):
|
||||
read = 0
|
||||
continue
|
||||
else:
|
||||
if((read & config.RF_SECTION) == config.RF_SECTION):
|
||||
n = a.split(":")
|
||||
al[n[0]] = n[1].replace("\n", "")
|
||||
return al
|
||||
|
||||
def match_allowed_section(self, dst, src, parent):
|
||||
for d in dst:
|
||||
cx = src.split(" ")
|
||||
if(len(cx) > 1):
|
||||
if(cx[1] == d):
|
||||
return [dst[d], src, d]
|
||||
return []
|
||||
|
||||
def match_allowed_sub(self, dst, src):
|
||||
sub = []
|
||||
a = src.replace("\n", "").split(",")
|
||||
for d in dst:
|
||||
for e in a:
|
||||
if(e == d):
|
||||
sub.append([e, dst[d]])
|
||||
return sub
|
||||
|
||||
def card_battlecry_target(self, obj, card):
|
||||
type = obj[0]
|
||||
target = obj[1]
|
||||
print type
|
||||
|
||||
def parse_card(self, b, name):
|
||||
|
||||
'''
|
||||
# files
|
||||
f = util.read(c, 0)
|
||||
b = ''
|
||||
for l in f:
|
||||
b += l.replace("\n","").replace("\t","")
|
||||
'''
|
||||
|
||||
# ignore first line
|
||||
b = b[b.find('\n') + 1:b.rfind('\n')]
|
||||
b = b.replace("\n","").replace("\t","")
|
||||
|
||||
try:
|
||||
j = json.loads(b)
|
||||
except:
|
||||
print 'parsing json failed %s [%s]' % (name, b)
|
||||
exit(1)
|
||||
|
||||
p = []
|
||||
|
||||
for i in j:
|
||||
f = self.match_allowed_section(self.allowed, i, j)
|
||||
if(len(f) > 0):
|
||||
s = self.match_allowed_sub(j[f[1]], f[0])
|
||||
p.append([f[2], s])
|
||||
|
||||
#crd = re.findall("[\w]+.card", c)
|
||||
#crd = name.split(".")
|
||||
|
||||
for i in p:
|
||||
#print i
|
||||
for s in i:
|
||||
if s != 'battlecry' and i[0] == 'battlecry':
|
||||
util.store_flag(config.file_ent_sections, 'CARD_BATTLECRY', name)
|
||||
|
||||
for ms in s:
|
||||
if 'target' in ms:
|
||||
for t in target.battlecry[ms[1]]:
|
||||
util.store_flag(config.file_ent_sections, t, name)
|
||||
|
||||
elif 'code' in ms:
|
||||
ms[1] = ms[1].replace("$", "HSL_")
|
||||
self.store(name, i[0], ms[1], config.sections[i[0]][0], "attacker")
|
||||
|
||||
|
||||
elif s != 'weapon' and i[0] == 'weapon':
|
||||
util.store_flag(config.file_ent_sections, 'CARD_SPELL', name)
|
||||
util.store_flag(config.file_ent_sections, 'CARD_AOE', name)
|
||||
util.store_flag(config.file_ent_sections, 'CARD_WEAPON', name)
|
||||
util.store_flag(config.file_ent_sections, 'CARD_NONTARGET', name)
|
||||
|
||||
for ms in s:
|
||||
if 'code' in ms:
|
||||
ms[1] = ms[1].replace("$", "HSL_")
|
||||
self.store(name, i[0], ms[1], config.sections[i[0]][0], "attacker")
|
||||
|
||||
|
||||
elif s != 'endturn' and i[0] == 'endturn':
|
||||
for ms in s:
|
||||
if 'code' in ms:
|
||||
ms[1] = ms[1].replace("$", "HSL_")
|
||||
self.store(name, i[0], ms[1], config.sections[i[0]][0], "attacker")
|
||||
|
||||
|
||||
elif s != 'spell_aoe' and i[0] == 'spell_aoe':
|
||||
util.store_flag(config.file_ent_sections, 'CARD_SPELL', name)
|
||||
util.store_flag(config.file_ent_sections, 'CARD_AOE', name)
|
||||
|
||||
for ms in s:
|
||||
if 'target' in ms:
|
||||
for t in target.regular[ms[1]]:
|
||||
util.store_flag(config.file_ent_sections, t, name)
|
||||
|
||||
elif 'code' in ms:
|
||||
ms[1] = ms[1].replace("$", "HSL_")
|
||||
self.store(name, i[0], ms[1], config.sections[i[0]][0], "attacker")
|
||||
|
||||
elif s != 'spell' and i[0] == 'spell':
|
||||
util.store_flag(config.file_ent_sections, 'CARD_SPELL', name)
|
||||
for ms in s:
|
||||
if 'target' in ms:
|
||||
for t in target.regular[ms[1]]:
|
||||
util.store_flag(config.file_ent_sections, t, name)
|
||||
|
||||
elif 'code' in ms:
|
||||
ms[1] = ms[1].replace("$", "HSL_")
|
||||
self.store(name, i[0], ms[1], config.sections[i[0]][0], "attacker")
|
||||
|
||||
elif s != 'attack' and i[0] == 'attack':
|
||||
util.store_flag(config.file_ent_sections, 'CARD_MINION', name)
|
||||
util.store_flag(config.file_ent_sections, 'CARD_TARGETING', name)
|
||||
|
||||
for ms in s:
|
||||
if 'target' in ms:
|
||||
for t in target.regular[ms[1]]:
|
||||
util.store_flag(config.file_ent_sections, t, name)
|
||||
|
||||
elif 'code' in ms:
|
||||
ms[1] = ms[1].replace("$", "HSL_")
|
||||
self.store(name, i[0], ms[1], config.sections[i[0]][0], "attacker")
|
||||
|
||||
|
||||
elif s != 'attack_effect' and i[0] == 'attack_effect':
|
||||
util.store_flag(config.file_ent_sections, 'CARD_MINION', name)
|
||||
|
||||
for ms in s:
|
||||
if 'code' in ms:
|
||||
ms[1] = ms[1].replace("$", "HSL_")
|
||||
self.store(name, i[0], ms[1], config.sections[i[0]][0], "attacker")
|
||||
|
||||
elif s != 'onboard' and i[0] == 'onboard':
|
||||
for ms in s:
|
||||
if 'code' in ms:
|
||||
ms[1] = ms[1].replace("$", "HSL_")
|
||||
self.store(name, i[0], ms[1], config.sections[i[0]][0], "attacker")
|
||||
|
||||
elif s != 'destroyed' and i[0] == 'destroyed':
|
||||
for ms in s:
|
||||
if 'code' in ms:
|
||||
ms[1] = ms[1].replace("$", "HSL_")
|
||||
self.store(name, i[0], ms[1], config.sections[i[0]][0], "fake_defender")
|
||||
|
||||
elif s != 'defender' and i[0] == 'defender':
|
||||
for ms in s:
|
||||
if 'code' in ms:
|
||||
ms[1] = ms[1].replace("$", "HSL_")
|
||||
self.store(name, i[0], ms[1], config.sections[i[0]][0], "fake_defender")
|
||||
|
||||
elif s != 'weapon_destroyed' and i[0] == 'weapon_destroyed':
|
||||
for ms in s:
|
||||
if 'code' in ms:
|
||||
ms[1] = ms[1].replace("$", "HSL_")
|
||||
self.store(name, i[0], ms[1], config.sections[i[0]][0], "fake_weapon")
|
||||
|
||||
elif s != 'idle' and i[0] == 'idle':
|
||||
for ms in s:
|
||||
if 'code' in ms:
|
||||
ms[1] = ms[1].replace("$", "HSL_")
|
||||
self.store(name, i[0], ms[1], config.sections[i[0]][0], "fake_attacker")
|
||||
|
||||
|
||||
elif s != 'weapon_attack' and i[0] == 'weapon_attack':
|
||||
for ms in s:
|
||||
if 'code' in ms:
|
||||
ms[1] = ms[1].replace("$", "HSL_")
|
||||
self.store(name, i[0], ms[1], config.sections[i[0]][0], "fake_weapon")
|
||||
|
||||
elif s != 'attachment_attack' and i[0] == 'attachment_attack':
|
||||
for ms in s:
|
||||
if 'code' in ms:
|
||||
ms[1] = ms[1].replace("$", "HSL_")
|
||||
self.store(name, i[0], ms[1], config.sections[i[0]][0], "fake_attacker")
|
||||
|
||||
elif s != 'attack_effect_attachment' and i[0] == 'attack_effect_attachment':
|
||||
for ms in s:
|
||||
if 'code' in ms:
|
||||
ms[1] = ms[1].replace("$", "HSL_")
|
||||
self.store(name, i[0], ms[1], config.sections[i[0]][0], "fake_attacker")
|
||||
|
||||
elif s != 'properties' and i[0] == 'properties':
|
||||
for ms in s:
|
||||
if 'all' in ms:
|
||||
for mss in ms[1]:
|
||||
util.store_flag(config.file_ent_sections, "CARD_%s" % mss.upper(), name)
|
||||
|
||||
if 'levelup' in ms:
|
||||
self.levelup(config.file_levelup_c, name, ms[1])
|
||||
#for mss in ms[1]:
|
||||
# util.store_flag(config.file_ent_sections, "CARD_%s" % mss.upper(), name)
|
||||
|
||||
elif s != 'buff' and i[0] == 'buff':
|
||||
util.store_flag(config.file_ent_sections, 'CARD_BUFF', name)
|
||||
util.store_flag(config.file_ent_sections, 'CARD_SPELL', name)
|
||||
|
||||
for ms in s:
|
||||
if 'code' in ms:
|
||||
ms[1] = ms[1].replace("$", "HSL_")
|
||||
self.store(name, i[0], ms[1], config.sections[i[0]][0], "attacker")
|
||||
elif 'target' in ms:
|
||||
for t in target.regular[ms[1]]:
|
||||
util.store_flag(config.file_ent_sections, t, name)
|
||||
|
||||
|
||||
def levelup(self, f, dst, src):
|
||||
util.write(f, "\t{%s, \"%s\"},\n" % (src, dst), "a")
|
||||
config.no_levelup = config.no_levelup + 1
|
||||
|
||||
def store(self, card, section, code, path, entity):
|
||||
#c = re.findall("[\w]+.card", card)
|
||||
#c = c[0].split(".")
|
||||
|
||||
if(section == 'endturn'):
|
||||
buf = '#define %s_%s\\\n\
|
||||
{\\\n\
|
||||
%s\\\n\
|
||||
}\n\n' % (section, card, code)
|
||||
|
||||
elif(section == 'idle'):
|
||||
buf = '#define %s_%s\\\n\
|
||||
{ %s }\\\n\
|
||||
\n\n' % (section, card, code)
|
||||
|
||||
elif(section == 'attack_effect_attachment'):
|
||||
buf = '#define %s_%s\\\n\
|
||||
{\\\n\
|
||||
%s\\\n\
|
||||
}\n\n' % (section, card,code)
|
||||
|
||||
elif(section == 'attachment_attack'):
|
||||
buf = '#define %s_%s\\\n\
|
||||
{\\\n\
|
||||
int count = hsl_count_attachments(HSL_fake_deck, NULL, HSL_fake_attacker, "%s");\\\n\
|
||||
if(count == 1) {\\\n\
|
||||
%s\\\n\
|
||||
}}\n\n' % (section, card, card, code)
|
||||
|
||||
else:
|
||||
buf = '#define %s_%s\\\n\
|
||||
if(HSL_%s && flag(&(HSL_%s->state), %s_%s_FLAG, FLAG_ISSET)) {\\\n\
|
||||
%s\\\n\
|
||||
}\n\n' % (section, card, entity, entity, section, card, code)
|
||||
|
||||
|
||||
util.write(path, buf, "a")
|
||||
|
||||
config.sections[section][2].append("%s_%s" % (section, card))
|
||||
|
||||
flag = "%s_%s_FLAG, 1000\n" % (section, card)
|
||||
util.write(config.file_flags_sections, flag, "a")
|
||||
|
||||
flag1 = "%s_%s_FLAG" % (section, card)
|
||||
util.store_flag(config.file_ent_sections, flag1, card)
|
||||
@@ -0,0 +1,63 @@
|
||||
'''
|
||||
hm_gameserver - hearthmod gameserver
|
||||
Copyright (C) 2016 Filip Pancik
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
'''
|
||||
regular = {
|
||||
"$all" : ["CARD_TARGET_ALL", "CARD_TARGETING"],
|
||||
"$minions" : ["CARD_TARGET_MINIONS", "CARD_TARGETING"],
|
||||
"$hero" : ["CARD_TARGET_HERO", "CARD_TARGETING"],
|
||||
"$enemy_hero" : ["CARD_TARGET_ENEMY_HERO", "CARD_TARGETING"],
|
||||
"$enemy_minions" : ["CARD_TARGET_ENEMY_MINIONS", "CARD_TARGETING"],
|
||||
"$ally_hero" : ["CARD_TARGET_ALLY_HERO", "CARD_TARGETING"],
|
||||
"$ally_minions" : ["CARD_TARGET_ALLY_MINIONS", "CARD_TARGETING"],
|
||||
"$ally_bosses" : ["CARD_TARGET_ALLY_BOSSES", "CARD_TARGETING"],
|
||||
"$enemy_bosses" : ["CARD_TARGET_ENEMY_BOSSES", "CARD_TARGETING"],
|
||||
"$bosses" : ["CARD_TARGET_BOSSES", "CARD_TARGETING"],
|
||||
"$ally_board" : ["CARD_TARGET_ALLY_BOARD", "CARD_TARGETING"],
|
||||
"$enemy_board" : ["CARD_TARGET_ENEMY_BOARD", "CARD_TARGETING"],
|
||||
"$board" : ["CARD_TARGET_BOARD", "CARD_TARGETING"],
|
||||
"$ally" : ["CARD_TARGET_ALLY", "CARD_TARGETING"],
|
||||
"$enemy" : ["CARD_TARGET_ENEMY", "CARD_TARGETING"],
|
||||
"$auto" : ["CARD_NONTARGET"],
|
||||
"$undamaged_minions":["CARD_TARGET_UNDAMAGED_MINION", "CARD_TARGETING"],
|
||||
"$damaged_minions":["CARD_TARGET_DAMAGED_MINION", "CARD_TARGETING"],
|
||||
"$attack5more_minions":["CARD_TARGET_5ATTACK_MORE", "CARD_TARGETING"],
|
||||
"$attack3less_minions":["CARD_TARGET_3ATTACK_LESS", "CARD_TARGETING"],
|
||||
"$health_below_30p_minions":["CARD_TARGET_30PERCENT_LESS", "CARD_TARGETING"],
|
||||
"$URSA":["CARD_TARGET_URSA", "CARD_TARGETING"],
|
||||
"$SVEN":["CARD_TARGET_SVEN", "CARD_TARGETING"],
|
||||
}
|
||||
|
||||
battlecry = {
|
||||
"$all" : ["CARD_TARGET_ALL", "CARD_TARGETING_BC"],
|
||||
"$minions" : ["CARD_TARGET_MINIONS", "CARD_TARGETING_BC"],
|
||||
"$hero" : ["CARD_TARGET_HERO", "CARD_TARGETING_BC"],
|
||||
"$enemy_hero" : ["CARD_TARGET_ENEMY_HERO", "CARD_TARGETING_BC"],
|
||||
"$enemy_minions" : ["CARD_TARGET_ENEMY_MINIONS", "CARD_TARGETING_BC"],
|
||||
"$ally_hero" : ["CARD_TARGET_ALLY_HERO", "CARD_TARGETING_BC"],
|
||||
"$ally_minions" : ["CARD_TARGET_ALLY_MINIONS", "CARD_TARGETING_BC"],
|
||||
"$ally" : ["CARD_TARGET_ALLY", "CARD_TARGETING_BC"],
|
||||
"$enemy" : ["CARD_TARGET_ENEMY", "CARD_TARGETING_BC"],
|
||||
"$ally_bosses" : ["CARD_TARGET_ALLY_BOSSES", "CARD_TARGETING_BC"],
|
||||
"$enemy_bosses" : ["CARD_TARGET_ENEMY_BOSSES", "CARD_TARGETING_BC"],
|
||||
"$bosses" : ["CARD_TARGET_BOSSES", "CARD_TARGETING_BC"],
|
||||
"$ally_board" : ["CARD_TARGET_ALLY_BOARD", "CARD_TARGETING_BC"],
|
||||
"$enemy_board" : ["CARD_TARGET_ENEMY_BOARD", "CARD_TARGETING_BC"],
|
||||
"$board" : ["CARD_TARGET_BOARD", "CARD_TARGETING_BC"],
|
||||
"$auto" : ["CARD_NONTARGET_BC"],
|
||||
"$undamaged_minions":["CARD_TARGET_UNDAMAGED_MINION", "CARD_TARGETING_BC"],
|
||||
"$damaged_minions":["CARD_TARGET_DAMAGED_MINION", "CARD_TARGETING_BC"],
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
'''
|
||||
hm_gameserver - hearthmod gameserver
|
||||
Copyright (C) 2016 Filip Pancik
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
'''
|
||||
import re
|
||||
|
||||
import config
|
||||
|
||||
def write(f, buf, m):
|
||||
l = open(f, m)
|
||||
l.write(buf)
|
||||
l.close()
|
||||
|
||||
def read(f, t):
|
||||
f = open(f, "r")
|
||||
if(t == 0):
|
||||
b = []
|
||||
c = f.readlines()
|
||||
for l in c:
|
||||
if l.startswith('#'):
|
||||
continue
|
||||
b.append(l)
|
||||
return b
|
||||
else:
|
||||
b = f.read()
|
||||
f.close()
|
||||
|
||||
return b
|
||||
|
||||
def store_flag(dst, f, i):
|
||||
if(f.find("ENABLED") > -1):
|
||||
return
|
||||
|
||||
lines = read(config.file_entities, 0)
|
||||
for l in lines:
|
||||
if(l.find("{ \"%s\"" % i) > -1):
|
||||
index = re.findall("// [\w]+", l)[0].split(" ")[1]
|
||||
write(dst, "\tflag(&entities[%s].flags, %s, FLAG_SET);\n" % (index, f), "a")
|
||||
break
|
||||
Reference in New Issue
Block a user