Add containerization and make this bad boy work on Windows and MacOS
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#ifndef SECTION_ATTACHMENT_ATTACK_H_
|
||||
#define SECTION_ATTACHMENT_ATTACK_H_
|
||||
|
||||
#define attachment_attack_EX1_607e\
|
||||
{\
|
||||
int count = hsl_count_attachments(HSL_fake_deck, NULL, HSL_fake_attacker, "EX1_607e");\
|
||||
if(count == 1) {\
|
||||
hsl_replenish_health(HSL_fake_attacker, 1); \
|
||||
}}
|
||||
|
||||
#define __SECTION_ATTACHMENT_ATTACK\
|
||||
attachment_attack_EX1_607e\
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,234 @@
|
||||
#ifndef SECTION_ATTACK_H_
|
||||
#define SECTION_ATTACK_H_
|
||||
|
||||
#define attack_EX1_097\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_EX1_097_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_EX1_011\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_EX1_011_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_EX1_105\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_EX1_105_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_CS2_088\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_CS2_088_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_EX1_158t\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_EX1_158t_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_NAX4_03H\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_NAX4_03H_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_AT_023\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_AT_023_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_CS2_168\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_CS2_168_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_CS2_201\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_CS2_201_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_CS2_200\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_CS2_200_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_CS2_119\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_CS2_119_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_CS2_172\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_CS2_172_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_CS2_171\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_CS2_171_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_CS2_182\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_CS2_182_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_CS2_120\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_CS2_120_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_EX1_506a\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_EX1_506a_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_CS2_042\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_CS2_042_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_CS2_boar\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_CS2_boar_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_CS2_237\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_CS2_237_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_LOE_077\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_LOE_077_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_CS2_118\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_CS2_118_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_AT_128\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_AT_128_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_EX1_614\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_EX1_614_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_EX1_593\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_EX1_593_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_GVG_105\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_GVG_105_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_NEW1_030\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_NEW1_030_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_EX1_383\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_EX1_383_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_CS2_065\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_CS2_065_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_AT_018\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_AT_018_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_EX1_165t2\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_EX1_165t2_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_EX1_559\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_EX1_559_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_NEW1_011\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_NEW1_011_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_CS2_226\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_CS2_226_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_EX1_009\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_EX1_009_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_EX1_049\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_EX1_049_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_EX1_306\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_EX1_306_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_CS2_222\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_CS2_222_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define attack_CS2_231\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_CS2_231_FLAG, FLAG_ISSET)) {\
|
||||
hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define __SECTION_ATTACK\
|
||||
attack_EX1_097\
|
||||
attack_EX1_011\
|
||||
attack_EX1_105\
|
||||
attack_CS2_088\
|
||||
attack_EX1_158t\
|
||||
attack_NAX4_03H\
|
||||
attack_AT_023\
|
||||
attack_CS2_168\
|
||||
attack_CS2_201\
|
||||
attack_CS2_200\
|
||||
attack_CS2_119\
|
||||
attack_CS2_172\
|
||||
attack_CS2_171\
|
||||
attack_CS2_182\
|
||||
attack_CS2_120\
|
||||
attack_EX1_506a\
|
||||
attack_CS2_042\
|
||||
attack_CS2_boar\
|
||||
attack_CS2_237\
|
||||
attack_LOE_077\
|
||||
attack_CS2_118\
|
||||
attack_AT_128\
|
||||
attack_EX1_614\
|
||||
attack_EX1_593\
|
||||
attack_GVG_105\
|
||||
attack_NEW1_030\
|
||||
attack_EX1_383\
|
||||
attack_CS2_065\
|
||||
attack_AT_018\
|
||||
attack_EX1_165t2\
|
||||
attack_EX1_559\
|
||||
attack_NEW1_011\
|
||||
attack_CS2_226\
|
||||
attack_EX1_009\
|
||||
attack_EX1_049\
|
||||
attack_EX1_306\
|
||||
attack_CS2_222\
|
||||
attack_CS2_231\
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef SECTION_ATTACK_EFFECT_H_
|
||||
#define SECTION_ATTACK_EFFECT_H_
|
||||
|
||||
#define attack_effect_CS2_024\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), attack_effect_CS2_024_FLAG, FLAG_ISSET)) {\
|
||||
hsl_freeze(HSL_attacker, HSL_defender) \
|
||||
}
|
||||
|
||||
#define __SECTION_ATTACK_EFFECT\
|
||||
attack_effect_CS2_024\
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef SECTION_ATTACK_EFFECT_ATTACHMENT_H_
|
||||
#define SECTION_ATTACK_EFFECT_ATTACHMENT_H_
|
||||
|
||||
#define attack_effect_attachment_LOEA06_03e\
|
||||
{\
|
||||
if(!is_spell(HSL_attacker) && attack > 0) { int count = hsl_count_attachments(hsl_deck(HSL_defender), NULL, HSL_defender, CN_DESOLATOR_BONUS); if(count > 0) { attack += count; } } \
|
||||
}
|
||||
|
||||
#define __SECTION_ATTACK_EFFECT_ATTACHMENT\
|
||||
attack_effect_attachment_LOEA06_03e\
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,78 @@
|
||||
#ifndef SECTION_BATTLECRY_H_
|
||||
#define SECTION_BATTLECRY_H_
|
||||
|
||||
#define battlecry_EX1_097\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), battlecry_EX1_097_FLAG, FLAG_ISSET)) {\
|
||||
def(card_s, def) def = hsl_card(HSL_target); if(def) { hsl_increase_health(HSL_attacker, default_health(def)); hsl_change_attack(HSL_attacker, default_attack(def)); hsl_destroy(hsl_deck(def), def); } \
|
||||
}
|
||||
|
||||
#define battlecry_EX1_011\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), battlecry_EX1_011_FLAG, FLAG_ISSET)) {\
|
||||
def(card_s, def) def = hsl_card(HSL_target); if(def) { hsl_heal_bc(HSL_attacker, def, 2); } \
|
||||
}
|
||||
|
||||
#define battlecry_CS2_088\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), battlecry_CS2_088_FLAG, FLAG_ISSET)) {\
|
||||
def(card_list_s, allcards) allcards = hsl_board_friendly_cards(HSL_deck_player, HSL_attacker->id, HSL_heroes_included); def(card_list_s, cl) foreach(cl, allcards) { cl->card->receive.heal = 99; } hsl_attack_aoe(attacker, allcards, HSL_fake_levelup); hsl_link_target(attacker, allcards); \
|
||||
}
|
||||
|
||||
#define battlecry_CS2_042\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), battlecry_CS2_042_FLAG, FLAG_ISSET)) {\
|
||||
def(card_s, def) def = hsl_card(HSL_target); if(def) { hsl_attack_bc(HSL_attacker, def, 3); } \
|
||||
}
|
||||
|
||||
#define battlecry_LOE_077\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), battlecry_LOE_077_FLAG, FLAG_ISSET)) {\
|
||||
hsl_summon_card(HSL_deck_player, CN_BOAR, cardholder1); hsl_summon_card(HSL_deck_player, CN_VULTURE, cardholder2); \
|
||||
}
|
||||
|
||||
#define battlecry_EX1_614\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), battlecry_EX1_614_FLAG, FLAG_ISSET)) {\
|
||||
def(card_s, def) def = hsl_card(HSL_target); if(def) { hsl_swap_health(HSL_attacker, def); } \
|
||||
}
|
||||
|
||||
#define battlecry_EX1_593\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), battlecry_EX1_593_FLAG, FLAG_ISSET)) {\
|
||||
def(card_s, def) def = hsl_card(HSL_target); if(def) { hsl_attack_bc(HSL_attacker, def, 2); } \
|
||||
}
|
||||
|
||||
#define battlecry_GVG_105\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), battlecry_GVG_105_FLAG, FLAG_ISSET)) {\
|
||||
def(card_list_s, allcards) allcards = hsl_board_friendly_cards(HSL_deck_player, HSL_attacker->id, HSL_heroes_excluded); def(card_list_s, cl) foreach(cl, allcards) { hsl_unset_exhausted(card(cl)); } \
|
||||
}
|
||||
|
||||
#define battlecry_NEW1_030\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), battlecry_NEW1_030_FLAG, FLAG_ISSET)) {\
|
||||
def(card_list_s, allcards); allcards = hsl_board_all_cards_no_boss(HSL_attacker, HSL_heroes_excluded); def(card_list_s, itm); foreach(itm, allcards) { if(card(itm)->controller == HSL_deck_player->controller) { hsl_destroy(HSL_deck_player, card(itm)); } else { hsl_destroy(HSL_deck_opponent, card(itm)); } } def(card_list_s, hand); hand = hsl_cards_get_hand(HSL_deck_player); hsl_discard_hand(HSL_deck_player, hand); \
|
||||
}
|
||||
|
||||
#define battlecry_CS2_226\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), battlecry_CS2_226_FLAG, FLAG_ISSET)) {\
|
||||
int num_minions = hsl_board_minions_count(HSL_deck_player, HSL_attacker); if(num_minions > 0) { hsl_change_attack(HSL_attacker, num_minions); hsl_increase_health(HSL_attacker, num_minions); hsl_add_single_attachment(HSL_player, HSL_deck_player, HSL_attacker, HSL_attacker); } \
|
||||
}
|
||||
|
||||
#define battlecry_EX1_049\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), battlecry_EX1_049_FLAG, FLAG_ISSET)) {\
|
||||
def(card_s, def) def = hsl_card(HSL_target); if(def) { hsl_return_to_hand(def); } \
|
||||
}
|
||||
|
||||
#define battlecry_EX1_306\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), battlecry_EX1_306_FLAG, FLAG_ISSET)) {\
|
||||
hsl_discard_random_hand(HSL_deck_player, 1, holder) \
|
||||
}
|
||||
|
||||
#define __SECTION_BATTLECRY\
|
||||
battlecry_EX1_097\
|
||||
battlecry_EX1_011\
|
||||
battlecry_CS2_088\
|
||||
battlecry_CS2_042\
|
||||
battlecry_LOE_077\
|
||||
battlecry_EX1_614\
|
||||
battlecry_EX1_593\
|
||||
battlecry_GVG_105\
|
||||
battlecry_NEW1_030\
|
||||
battlecry_CS2_226\
|
||||
battlecry_EX1_049\
|
||||
battlecry_EX1_306\
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,114 @@
|
||||
#ifndef SECTION_BUFF_H_
|
||||
#define SECTION_BUFF_H_
|
||||
|
||||
#define buff_EX1_371\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), buff_EX1_371_FLAG, FLAG_ISSET)) {\
|
||||
hsl_divine_shield(HSL_defender); \
|
||||
}
|
||||
|
||||
#define buff_CS2_011\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), buff_CS2_011_FLAG, FLAG_ISSET)) {\
|
||||
hsl_add_attachment(HSL_player, HSL_attacker, HSL_defender, 2); \
|
||||
}
|
||||
|
||||
#define buff_OG_223\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), buff_OG_223_FLAG, FLAG_ISSET)) {\
|
||||
int change = HSL_defender->attack; hsl_buff_attack_expire(1, HSL_defender, change); hsl_add_attachment(HSL_player, HSL_attacker, HSL_defender, 1); \
|
||||
}
|
||||
|
||||
#define buff_OG_101\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), buff_OG_101_FLAG, FLAG_ISSET)) {\
|
||||
hsl_destroy(HSL_deck_player, HSL_defender); int i; for(i = 0; i < 2; i++) { hsl_summon_card(HSL_deck_player, CN_EIDOLON, cardholder); } \
|
||||
}
|
||||
|
||||
#define buff_CS2_108\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), buff_CS2_108_FLAG, FLAG_ISSET)) {\
|
||||
if(HSL_defender->controller == HSL_deck_player->controller) { hsl_destroy(HSL_deck_player, HSL_defender); } else { hsl_destroy(HSL_deck_opponent, HSL_defender); } \
|
||||
}
|
||||
|
||||
#define buff_NEW1_036\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), buff_NEW1_036_FLAG, FLAG_ISSET)) {\
|
||||
def(card_list_s, all); all = hsl_board_friendly_cards(HSL_deck_player, HSL_attacker->id, HSL_heroes_excluded); def(card_list_s, itm); foreach(itm, all) { hsl_buff_attack_expire(1, itm->card, 1); hsl_add_attachment(HSL_player, HSL_attacker, itm->card, 1); hsl_add_defender(itm->card, holder); } \
|
||||
}
|
||||
|
||||
#define buff_CS2_077\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), buff_CS2_077_FLAG, FLAG_ISSET)) {\
|
||||
hsl_draw_cards(HSL_player, HSL_deck_player, draw_card, 4); \
|
||||
}
|
||||
|
||||
#define buff_CS2_023\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), buff_CS2_023_FLAG, FLAG_ISSET)) {\
|
||||
hsl_draw_cards(HSL_player, HSL_deck_player, draw_card, 2) \
|
||||
}
|
||||
|
||||
#define buff_LOEA16_9\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), buff_LOEA16_9_FLAG, FLAG_ISSET)) {\
|
||||
hsl_refresh_mana(HSL_deck_player, 3); \
|
||||
}
|
||||
|
||||
#define buff_CS2_234\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), buff_CS2_234_FLAG, FLAG_ISSET)) {\
|
||||
hsl_destroy(hsl_deck(HSL_defender),HSL_defender); \
|
||||
}
|
||||
|
||||
#define buff_PRO_001c\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), buff_PRO_001c_FLAG, FLAG_ISSET)) {\
|
||||
def(card_list_s, allcards); allcards = hsl_board_friendly_cards(HSL_deck_player, HSL_no_attacker, HSL_heroes_excluded); def(card_list_s, cl); foreach(cl, allcards) { hsl_set_exhausted(card(cl)); } \
|
||||
}
|
||||
|
||||
#define buff_CS2_063\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), buff_CS2_063_FLAG, FLAG_ISSET)) {\
|
||||
hsl_buff_corrupt_expire(2, HSL_defender); hsl_add_attachment(HSL_player, HSL_attacker, HSL_defender, 2); \
|
||||
}
|
||||
|
||||
#define buff_CS2_076\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), buff_CS2_076_FLAG, FLAG_ISSET)) {\
|
||||
hsl_destroy(HSL_deck_opponent, HSL_defender); \
|
||||
}
|
||||
|
||||
#define buff_AT_074\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), buff_AT_074_FLAG, FLAG_ISSET)) {\
|
||||
hsl_add_attachment(HSL_player, HSL_attacker, HSL_defender, 2); hsl_set_magic_immunity(HSL_defender); \
|
||||
}
|
||||
|
||||
#define buff_EX1_607\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), buff_EX1_607_FLAG, FLAG_ISSET)) {\
|
||||
hsl_add_single_attachment(HSL_player, HSL_deck_player, HSL_attacker, HSL_defender); \
|
||||
}
|
||||
|
||||
#define buff_OG_090\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), buff_OG_090_FLAG, FLAG_ISSET)) {\
|
||||
hsl_refresh_mana(HSL_deck_player, 3); \
|
||||
}
|
||||
|
||||
#define buff_EX1_581\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), buff_EX1_581_FLAG, FLAG_ISSET)) {\
|
||||
hsl_return_to_hand(HSL_defender); \
|
||||
}
|
||||
|
||||
#define buff_LOEA06_03\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), buff_LOEA06_03_FLAG, FLAG_ISSET)) {\
|
||||
int count = hsl_count_attachments(hsl_deck(HSL_defender), NULL, HSL_defender, CN_DESOLATOR_BONUS); if(count == 0) { hsl_add_single_attachment(HSL_player, hsl_deck(HSL_defender), HSL_attacker, HSL_defender); } \
|
||||
}
|
||||
|
||||
#define __SECTION_BUFF\
|
||||
buff_EX1_371\
|
||||
buff_CS2_011\
|
||||
buff_OG_223\
|
||||
buff_OG_101\
|
||||
buff_CS2_108\
|
||||
buff_NEW1_036\
|
||||
buff_CS2_077\
|
||||
buff_CS2_023\
|
||||
buff_LOEA16_9\
|
||||
buff_CS2_234\
|
||||
buff_PRO_001c\
|
||||
buff_CS2_063\
|
||||
buff_CS2_076\
|
||||
buff_AT_074\
|
||||
buff_EX1_607\
|
||||
buff_OG_090\
|
||||
buff_EX1_581\
|
||||
buff_LOEA06_03\
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef SECTION_DEFENDER_H_
|
||||
#define SECTION_DEFENDER_H_
|
||||
|
||||
#define defender_TB_SPT_Boss\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), defender_TB_SPT_Boss_FLAG, FLAG_ISSET)) {\
|
||||
\
|
||||
}
|
||||
|
||||
#define defender_CS2_118\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), defender_CS2_118_FLAG, FLAG_ISSET)) {\
|
||||
/* Necromastery */ if(!(is_destroyed(HSL_fake_defender)) && level(HSL_fake_defender) >= 2) { def(deck_s, mdeck); mdeck = HSL_fake_defender->controller == HSL_deck_player->controller ? HSL_deck_player : HSL_deck_opponent ; int stacks = hsl_count_attachments(mdeck, NULL, HSL_fake_defender, CN_NECROMASTERY); if(is_destroyed(HSL_fake_attacker) && stacks < 5) { hsl_change_attack(HSL_fake_defender, 1); hsl_apply_attachment(HSL_player, mdeck, HSL_fake_defender, CN_NECROMASTERY); } } \
|
||||
}
|
||||
|
||||
#define defender_NEW1_011\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), defender_NEW1_011_FLAG, FLAG_ISSET)) {\
|
||||
if(!(is_destroyed(HSL_fake_defender)) && level(HSL_fake_defender) >= 2) { if(HSL_fake_defender->controller == HSL_deck_player->controller) { hsl_add_new_card_hand(HSL_deck_player, CN_COUNTER_HELIX, holder); } else { hsl_add_new_card_hand(HSL_deck_opponent, CN_COUNTER_HELIX, holder); } } \
|
||||
}
|
||||
|
||||
#define __SECTION_DEFENDER\
|
||||
defender_TB_SPT_Boss\
|
||||
defender_CS2_118\
|
||||
defender_NEW1_011\
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,150 @@
|
||||
#ifndef SECTION_DESTROYED_H_
|
||||
#define SECTION_DESTROYED_H_
|
||||
|
||||
#define destroyed_EX1_354\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_EX1_354_FLAG, FLAG_ISSET)) {\
|
||||
hsl_add_new_card_hand(HSL_deck_player, "EX1_354", holder); \
|
||||
}
|
||||
|
||||
#define destroyed_CS2_012\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_CS2_012_FLAG, FLAG_ISSET)) {\
|
||||
hsl_add_new_card_hand(HSL_deck_player, CN_SWIPES, holder); \
|
||||
}
|
||||
|
||||
#define destroyed_EX1_371\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_EX1_371_FLAG, FLAG_ISSET)) {\
|
||||
hsl_add_new_card_hand(HSL_deck_player, "EX1_371", holder); \
|
||||
}
|
||||
|
||||
#define destroyed_EX1_312\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_EX1_312_FLAG, FLAG_ISSET)) {\
|
||||
hsl_add_new_card_hand(HSL_deck_player, CN_BLACK_HOLE, holder); \
|
||||
}
|
||||
|
||||
#define destroyed_CS2_011\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_CS2_011_FLAG, FLAG_ISSET)) {\
|
||||
hsl_add_new_card_hand(HSL_deck_player, CN_ENRAGE, holder); \
|
||||
}
|
||||
|
||||
#define destroyed_OG_223\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_OG_223_FLAG, FLAG_ISSET)) {\
|
||||
hsl_add_new_card_hand(HSL_deck_player, CN_GODS_STRENGTH, holder); \
|
||||
}
|
||||
|
||||
#define destroyed_EX1_251\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_EX1_251_FLAG, FLAG_ISSET)) {\
|
||||
hsl_add_new_card_hand(HSL_deck_player, CN_FORKED_LIGHTNING, holder); \
|
||||
}
|
||||
|
||||
#define destroyed_EX1_259\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_EX1_259_FLAG, FLAG_ISSET)) {\
|
||||
hsl_add_new_card_hand(HSL_deck_player, CN_GODS_WRATH, holder); \
|
||||
}
|
||||
|
||||
#define destroyed_OG_101\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_OG_101_FLAG, FLAG_ISSET)) {\
|
||||
hsl_add_new_card_hand(HSL_deck_player, CN_DEMONIC_CONVERSION, holder); \
|
||||
}
|
||||
|
||||
#define destroyed_CS2_108\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_CS2_108_FLAG, FLAG_ISSET)) {\
|
||||
hsl_add_new_card_hand(HSL_deck_player, CN_CULLING_BLADE, holder); \
|
||||
}
|
||||
|
||||
#define destroyed_EX1_303\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_EX1_303_FLAG, FLAG_ISSET)) {\
|
||||
hsl_add_new_card_hand(HSL_deck_player, CN_REQUIEM_OF_SOULS, holder); \
|
||||
}
|
||||
|
||||
#define destroyed_NEW1_036\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_NEW1_036_FLAG, FLAG_ISSET)) {\
|
||||
hsl_add_new_card_hand(HSL_deck_player, CN_WARCRY, holder); \
|
||||
}
|
||||
|
||||
#define destroyed_BRM_003\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_BRM_003_FLAG, FLAG_ISSET)) {\
|
||||
hsl_add_new_card_hand(HSL_deck_player, CN_DRAGONS_BREATH, holder); \
|
||||
}
|
||||
|
||||
#define destroyed_AT_001\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_AT_001_FLAG, FLAG_ISSET)) {\
|
||||
hsl_add_new_card_hand(HSL_deck_player, CN_LAGUNA_BLADE, holder); \
|
||||
}
|
||||
|
||||
#define destroyed_CS2_118\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_CS2_118_FLAG, FLAG_ISSET)) {\
|
||||
hsl_destroy_inhand(CN_REQUIEM_OF_SOULS); \
|
||||
}
|
||||
|
||||
#define destroyed_AT_128\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_AT_128_FLAG, FLAG_ISSET)) {\
|
||||
hsl_summon_card(hsl_deck(HSL_fake_defender), CN_SKELETON, cardholder); \
|
||||
}
|
||||
|
||||
#define destroyed_EX1_383\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_EX1_383_FLAG, FLAG_ISSET)) {\
|
||||
hsl_destroy_inhand(CN_WARCRY); hsl_destroy_inhand(CN_GODS_STRENGTH); \
|
||||
}
|
||||
|
||||
#define destroyed_CS2_065\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_CS2_065_FLAG, FLAG_ISSET)) {\
|
||||
hsl_destroy_inhand(CN_DEMONIC_CONVERSION); hsl_destroy_inhand(CN_BLACK_HOLE); \
|
||||
}
|
||||
|
||||
#define destroyed_AT_018\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_AT_018_FLAG, FLAG_ISSET)) {\
|
||||
hsl_destroy_inhand(CN_DRAGONS_BREATH); hsl_destroy_inhand(CN_LAGUNA_BLADE); \
|
||||
}
|
||||
|
||||
#define destroyed_EX1_165t2\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_EX1_165t2_FLAG, FLAG_ISSET)) {\
|
||||
hsl_destroy_inhand(CN_ENRAGE); hsl_destroy_inhand(CN_SWIPES); \
|
||||
}
|
||||
|
||||
#define destroyed_EX1_559\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_EX1_559_FLAG, FLAG_ISSET)) {\
|
||||
hsl_destroy_inhand(CN_FORKED_LIGHTNING); hsl_destroy_inhand(CN_GODS_WRATH); \
|
||||
}
|
||||
|
||||
#define destroyed_NEW1_011\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_NEW1_011_FLAG, FLAG_ISSET)) {\
|
||||
hsl_destroy_inhand(CN_CULLING_BLADE); hsl_destroy_inhand(CN_COUNTER_HELIX); \
|
||||
}
|
||||
|
||||
#define destroyed_CS2_222\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_CS2_222_FLAG, FLAG_ISSET)) {\
|
||||
def(card_list_s, all); all = hsl_board_friendly_cards(hsl_deck(HSL_fake_defender), -1, 0); def(card_list_s, itm) foreach(itm, all) { hsl_remove_attachment(hsl_deck(HSL_fake_defender), NULL, card(itm), CN_STORMWIND_CHAMP_BONUS); hsl_change_attack(card(itm), -1); hsl_decrease_health(card(itm), 1); } \
|
||||
}
|
||||
|
||||
#define destroyed_CS2_231\
|
||||
if(HSL_fake_defender && flag(&(HSL_fake_defender->state), destroyed_CS2_231_FLAG, FLAG_ISSET)) {\
|
||||
def(card_list_s, tiny); tiny = hsl_cards_by_name(hsl_deck(HSL_fake_defender), CN_TINY); def(card_list_s, itm); foreach(itm, tiny) { hsl_remove_attachment(hsl_deck(card(itm)), NULL, card(itm), CN_WISP_BONUS); hsl_change_attack(card(itm), -4); hsl_decrease_health(card(itm), 4); } \
|
||||
}
|
||||
|
||||
#define __SECTION_DESTROYED\
|
||||
destroyed_EX1_354\
|
||||
destroyed_CS2_012\
|
||||
destroyed_EX1_371\
|
||||
destroyed_EX1_312\
|
||||
destroyed_CS2_011\
|
||||
destroyed_OG_223\
|
||||
destroyed_EX1_251\
|
||||
destroyed_EX1_259\
|
||||
destroyed_OG_101\
|
||||
destroyed_CS2_108\
|
||||
destroyed_EX1_303\
|
||||
destroyed_NEW1_036\
|
||||
destroyed_BRM_003\
|
||||
destroyed_AT_001\
|
||||
destroyed_CS2_118\
|
||||
destroyed_AT_128\
|
||||
destroyed_EX1_383\
|
||||
destroyed_CS2_065\
|
||||
destroyed_AT_018\
|
||||
destroyed_EX1_165t2\
|
||||
destroyed_EX1_559\
|
||||
destroyed_NEW1_011\
|
||||
destroyed_CS2_222\
|
||||
destroyed_CS2_231\
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef SECTION_ENDTURN_H_
|
||||
#define SECTION_ENDTURN_H_
|
||||
|
||||
#define endturn_EX1_105\
|
||||
{\
|
||||
def(card_list_s, tiny); tiny = hsl_cards_by_name(HSL_fake_deck, CN_TINY); def(card_list_s, tc); foreach(tc, tiny) { hsl_change_attack(card(tc), 2); hsl_increase_health(card(tc), 2); hsl_add_single_attachment(HSL_player, HSL_fake_deck, card(tc), card(tc)); } \
|
||||
}
|
||||
|
||||
#define __SECTION_ENDTURN\
|
||||
endturn_EX1_105\
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,26 @@
|
||||
#ifndef SECTION_IDLE_H_
|
||||
#define SECTION_IDLE_H_
|
||||
|
||||
#define idle_CS2_097\
|
||||
{ if(is_boss(HSL_attacker) && is_weapon(HSL_deck_player, CN_DIVINE_RAPIER)) { hsl_apply_attachment(HSL_player, HSL_deck_player, HSL_attacker, CN_DIVINE_RAPIER_BONUS); hsl_change_attack(HSL_attacker, 8); } }\
|
||||
|
||||
|
||||
#define idle_LOE_118\
|
||||
{ if(is_boss(HSL_attacker) && is_weapon(HSL_deck_player, CN_ECHO_SABRE)) { hsl_set_windfury(HSL_attacker); } }\
|
||||
|
||||
|
||||
#define idle_CS2_222\
|
||||
{ int count = hsl_board_count_by_name(hsl_deck(HSL_fake_attacker), CN_STORMWIND_CHAMP); if(cmp_cardname(HSL_fake_attacker, CN_STORMWIND_CHAMP)) { count--; } if(count > 0) { int i; for(i = 0; i < count; i++) { hsl_apply_attachment(HSL_player, hsl_deck(HSL_fake_attacker), HSL_fake_attacker, CN_STORMWIND_CHAMP_BONUS); } hsl_change_attack(HSL_fake_attacker, count); hsl_increase_health(HSL_fake_attacker, count); } }\
|
||||
|
||||
|
||||
#define idle_CS2_231\
|
||||
{ if(cmp_cardname(HSL_attacker, CN_TINY)) { int wisps = hsl_board_count_by_name(HSL_deck_player, CN_WISP); if(wisps >= 1) { hsl_apply_attachment(HSL_player, HSL_deck_player, HSL_attacker, CN_WISP_BONUS); hsl_change_attack(HSL_attacker, 4); hsl_increase_health(HSL_attacker, 4); } } }\
|
||||
|
||||
|
||||
#define __SECTION_IDLE\
|
||||
idle_CS2_097\
|
||||
idle_LOE_118\
|
||||
idle_CS2_222\
|
||||
idle_CS2_231\
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,78 @@
|
||||
#ifndef SECTION_ONBOARD_H_
|
||||
#define SECTION_ONBOARD_H_
|
||||
|
||||
#define onboard_CS2_097\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), onboard_CS2_097_FLAG, FLAG_ISSET)) {\
|
||||
def(card_list_s, all) all = hsl_board_boss_cards(HSL_deck_player); def(card_list_s, itm) foreach(itm, all) { hsl_apply_attachment(HSL_player, HSL_deck_player, itm->card, CN_DIVINE_RAPIER_BONUS); hsl_change_attack(itm->card, 8); } \
|
||||
}
|
||||
|
||||
#define onboard_CS2_088\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), onboard_CS2_088_FLAG, FLAG_ISSET)) {\
|
||||
hsl_add_new_card_hand(HSL_deck_player, "EX1_371", holder); hsl_add_new_card_hand(HSL_deck_player, "EX1_354", holder1); \
|
||||
}
|
||||
|
||||
#define onboard_CS2_118\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), onboard_CS2_118_FLAG, FLAG_ISSET)) {\
|
||||
hsl_apply_attachment(HSL_player, HSL_deck_player, HSL_attacker, LEVEL_1); \
|
||||
}
|
||||
|
||||
#define onboard_EX1_383\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), onboard_EX1_383_FLAG, FLAG_ISSET)) {\
|
||||
hsl_apply_attachment(HSL_player, HSL_deck_player, HSL_attacker, LEVEL_1); \
|
||||
}
|
||||
|
||||
#define onboard_CS2_065\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), onboard_CS2_065_FLAG, FLAG_ISSET)) {\
|
||||
hsl_apply_attachment(HSL_player, HSL_deck_player, HSL_attacker, LEVEL_1); \
|
||||
}
|
||||
|
||||
#define onboard_AT_018\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), onboard_AT_018_FLAG, FLAG_ISSET)) {\
|
||||
hsl_apply_attachment(HSL_player, HSL_deck_player, HSL_attacker, LEVEL_1); \
|
||||
}
|
||||
|
||||
#define onboard_EX1_165t2\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), onboard_EX1_165t2_FLAG, FLAG_ISSET)) {\
|
||||
hsl_apply_attachment(HSL_player, HSL_deck_player, HSL_attacker, LEVEL_1); \
|
||||
}
|
||||
|
||||
#define onboard_EX1_559\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), onboard_EX1_559_FLAG, FLAG_ISSET)) {\
|
||||
hsl_apply_attachment(HSL_player, HSL_deck_player, HSL_attacker, LEVEL_1); \
|
||||
}
|
||||
|
||||
#define onboard_NEW1_011\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), onboard_NEW1_011_FLAG, FLAG_ISSET)) {\
|
||||
hsl_apply_attachment(HSL_player, HSL_deck_player, HSL_attacker, LEVEL_1); \
|
||||
}
|
||||
|
||||
#define onboard_LOE_118\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), onboard_LOE_118_FLAG, FLAG_ISSET)) {\
|
||||
def(card_list_s, all) all = hsl_board_boss_cards(HSL_deck_player); def(card_list_s, itm) foreach(itm, all) { hsl_set_windfury(itm->card); /* card can attack again */ if(turn_plays(itm->card) == 1) { hsl_unset_exhausted(itm->card); } } \
|
||||
}
|
||||
|
||||
#define onboard_CS2_222\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), onboard_CS2_222_FLAG, FLAG_ISSET)) {\
|
||||
def(card_list_s, all); all = hsl_board_friendly_cards(HSL_deck_player, HSL_attacker->id, 0); def(card_list_s, itm); foreach(itm, all) { hsl_apply_attachment(HSL_player, HSL_deck_player, card(itm), CN_STORMWIND_CHAMP_BONUS); hsl_change_attack(card(itm), 1); hsl_increase_health(card(itm), 1); } \
|
||||
}
|
||||
|
||||
#define onboard_CS2_231\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), onboard_CS2_231_FLAG, FLAG_ISSET)) {\
|
||||
def(card_list_s, tiny); tiny = hsl_cards_by_name(HSL_deck_player, CN_TINY); def(card_list_s, itm); foreach(itm, tiny) { hsl_apply_attachment(HSL_player, HSL_deck_player, card(itm), CN_WISP_BONUS); hsl_change_attack(card(itm), 4); hsl_increase_health(card(itm), 4); } \
|
||||
}
|
||||
|
||||
#define __SECTION_ONBOARD\
|
||||
onboard_CS2_097\
|
||||
onboard_CS2_088\
|
||||
onboard_CS2_118\
|
||||
onboard_EX1_383\
|
||||
onboard_CS2_065\
|
||||
onboard_AT_018\
|
||||
onboard_EX1_165t2\
|
||||
onboard_EX1_559\
|
||||
onboard_NEW1_011\
|
||||
onboard_LOE_118\
|
||||
onboard_CS2_222\
|
||||
onboard_CS2_231\
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,60 @@
|
||||
#ifndef SECTION_SPELL_H_
|
||||
#define SECTION_SPELL_H_
|
||||
|
||||
#define spell_EX1_354\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), spell_EX1_354_FLAG, FLAG_ISSET)) {\
|
||||
hsl_receive_heal(HSL_defender, 2); hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define spell_CS2_012\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), spell_CS2_012_FLAG, FLAG_ISSET)) {\
|
||||
/* Wounded multiplies damage */ int count = hsl_count_attachments(HSL_deck_player, HSL_deck_opponent, HSL_defender, CN_WOUNDED); hsl_receive_damage(HSL_defender, 2 + count * 2); /* Wounded lasts 6 rounds */ hsl_add_attachment(HSL_opponent, HSL_attacker, HSL_defender, 6); hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define spell_CS1h_001\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), spell_CS1h_001_FLAG, FLAG_ISSET)) {\
|
||||
hsl_receive_heal(HSL_defender, 2); hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define spell_CS2_072\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), spell_CS2_072_FLAG, FLAG_ISSET)) {\
|
||||
hsl_receive_damage(HSL_defender, 2); hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define spell_CS2_024\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), spell_CS2_024_FLAG, FLAG_ISSET)) {\
|
||||
hsl_receive_damage(HSL_defender, 3); hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define spell_DS1_185\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), spell_DS1_185_FLAG, FLAG_ISSET)) {\
|
||||
hsl_receive_damage(HSL_defender, 2); hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define spell_BRMA11_3\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), spell_BRMA11_3_FLAG, FLAG_ISSET)) {\
|
||||
hsl_receive_damage(HSL_defender, 2); hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define spell_BRM_003\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), spell_BRM_003_FLAG, FLAG_ISSET)) {\
|
||||
hsl_receive_damage(HSL_defender, 2); hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define spell_AT_001\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), spell_AT_001_FLAG, FLAG_ISSET)) {\
|
||||
hsl_receive_damage(HSL_defender, 10); hsl_attack(HSL_attacker, HSL_defenders, HSL_fake_levelup); \
|
||||
}
|
||||
|
||||
#define __SECTION_SPELL\
|
||||
spell_EX1_354\
|
||||
spell_CS2_012\
|
||||
spell_CS1h_001\
|
||||
spell_CS2_072\
|
||||
spell_CS2_024\
|
||||
spell_DS1_185\
|
||||
spell_BRMA11_3\
|
||||
spell_BRM_003\
|
||||
spell_AT_001\
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,54 @@
|
||||
#ifndef SECTION_SPELL_AOE_H_
|
||||
#define SECTION_SPELL_AOE_H_
|
||||
|
||||
#define spell_aoe_EX1_312\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), spell_aoe_EX1_312_FLAG, FLAG_ISSET)) {\
|
||||
def(card_list_s, e) e = hsl_board_enemy_cards(HSL_attacker, HSL_heroes_excluded, HSL_magic_immunity_excluded); def(card_list_s, cl) foreach(cl, e) { hsl_receive_damage(card(cl), 1); } hsl_attack_aoe(HSL_attacker, e, HSL_fake_levelup); hsl_link_target(HSL_attacker, e); \
|
||||
}
|
||||
|
||||
#define spell_aoe_EX1_251\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), spell_aoe_EX1_251_FLAG, FLAG_ISSET)) {\
|
||||
def(card_list_s, e) e = hsl_board_enemy_cards(HSL_attacker, HSL_heroes_excluded, HSL_magic_immunity_excluded); def(card_list_s, cl) foreach(cl, e) { hsl_receive_damage(card(cl), 1); } hsl_attack_aoe(HSL_attacker, e, HSL_fake_levelup); hsl_link_target(HSL_attacker, e); \
|
||||
}
|
||||
|
||||
#define spell_aoe_EX1_259\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), spell_aoe_EX1_259_FLAG, FLAG_ISSET)) {\
|
||||
def(card_list_s, e) e = hsl_board_enemy_cards(HSL_attacker, HSL_heroes_excluded, HSL_magic_immunity_excluded); def(card_list_s, cl) foreach(cl, e) { hsl_receive_damage(card(cl), 3); } hsl_attack_aoe(HSL_attacker, e, HSL_fake_levelup); hsl_link_target(HSL_attacker, e); \
|
||||
}
|
||||
|
||||
#define spell_aoe_EX1_303\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), spell_aoe_EX1_303_FLAG, FLAG_ISSET)) {\
|
||||
def(card_s, shadow_fiend); shadow_fiend = hsl_card_board_by_name(HSL_player, HSL_deck_player, CN_SHADOW_FIEND); if(shadow_fiend) { int count = hsl_count_attachments(HSL_deck_player, NULL, shadow_fiend, CN_NECROMASTERY); def(card_list_s, e) e = hsl_board_enemy_cards(HSL_attacker, HSL_heroes_excluded, HSL_magic_immunity_excluded); def(card_list_s, cl) foreach(cl, e) { hsl_receive_damage(card(cl), count); } hsl_attack_aoe(HSL_attacker, e, HSL_fake_levelup); hsl_link_target(HSL_attacker, e); } \
|
||||
}
|
||||
|
||||
#define spell_aoe_GVG_010\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), spell_aoe_GVG_010_FLAG, FLAG_ISSET)) {\
|
||||
hsl_refresh_mana(HSL_deck_player, 2); def(card_list_s, allcards) allcards = hsl_board_friendly_cards(HSL_deck_player, HSL_attacker->id, HSL_heroes_excluded); def(card_list_s, cl) foreach(cl, allcards) { hsl_receive_heal(card(cl), 2); } hsl_attack_aoe(HSL_attacker, allcards, HSL_fake_levelup); hsl_link_target(HSL_attacker, allcards); \
|
||||
}
|
||||
|
||||
#define spell_aoe_CS1_112\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), spell_aoe_CS1_112_FLAG, FLAG_ISSET)) {\
|
||||
def(card_list_s, allcards) allcards = hsl_board_friendly_cards(HSL_deck_player, HSL_attacker->id, HSL_heroes_excluded); def(card_list_s, cl) foreach(cl, allcards) { cl->card->receive.heal = 2; } hsl_attack_aoe(HSL_attacker, allcards, HSL_fake_levelup); hsl_link_target(HSL_attacker, allcards); \
|
||||
}
|
||||
|
||||
#define spell_aoe_EX1_400\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), spell_aoe_EX1_400_FLAG, FLAG_ISSET)) {\
|
||||
def(card_list_s, e) e = hsl_board_enemy_cards(HSL_attacker, HSL_heroes_excluded, HSL_magic_immunity_included); def(card_list_s, cl) foreach(cl, e) { hsl_receive_damage(card(cl), 1); } hsl_attack_aoe(HSL_attacker, e, HSL_fake_levelup); hsl_link_target(HSL_attacker, e); \
|
||||
}
|
||||
|
||||
#define spell_aoe_CS2_026\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), spell_aoe_CS2_026_FLAG, FLAG_ISSET)) {\
|
||||
def(card_list_s, e) e = hsl_board_enemy_cards(HSL_attacker, HSL_heroes_excluded, HSL_magic_immunity_excluded); int count = hsl_count_cards(e); if(count > 0) { def(card_s, card) card = hsl_random_card(e); def(card_list_s, cl) foreach(cl, e) { hsl_receive_damage(card(cl), 1); } if(card) { hsl_freeze(HSL_attacker, card); } } hsl_attack_aoe(HSL_attacker, e, HSL_fake_levelup); hsl_link_target(HSL_attacker, e); \
|
||||
}
|
||||
|
||||
#define __SECTION_SPELL_AOE\
|
||||
spell_aoe_EX1_312\
|
||||
spell_aoe_EX1_251\
|
||||
spell_aoe_EX1_259\
|
||||
spell_aoe_EX1_303\
|
||||
spell_aoe_GVG_010\
|
||||
spell_aoe_CS1_112\
|
||||
spell_aoe_EX1_400\
|
||||
spell_aoe_CS2_026\
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef SECTION_WEAPON_H_
|
||||
#define SECTION_WEAPON_H_
|
||||
|
||||
#define weapon_CS2_097\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), weapon_CS2_097_FLAG, FLAG_ISSET)) {\
|
||||
hsl_give_weapon(HSL_deck_player); \
|
||||
}
|
||||
|
||||
#define weapon_LOE_118\
|
||||
if(HSL_attacker && flag(&(HSL_attacker->state), weapon_LOE_118_FLAG, FLAG_ISSET)) {\
|
||||
hsl_give_weapon(HSL_deck_player); \
|
||||
}
|
||||
|
||||
#define __SECTION_WEAPON\
|
||||
weapon_CS2_097\
|
||||
weapon_LOE_118\
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef SECTION_WEAPON_ATTACK_H_
|
||||
#define SECTION_WEAPON_ATTACK_H_
|
||||
|
||||
#define weapon_attack_CS2_097\
|
||||
if(HSL_fake_weapon && flag(&(HSL_fake_weapon->state), weapon_attack_CS2_097_FLAG, FLAG_ISSET)) {\
|
||||
if(HSL_fake_weapon) { hsl_set_weapon_durability(HSL_fake_weapon, -1); if(hsl_weapon_durability(HSL_fake_weapon) == 0) { hsl_destroy_weapon(HSL_fake_weapon, HSL_fake_deck); } hsl_add_defender(HSL_fake_weapon, holder); } \
|
||||
}
|
||||
|
||||
#define weapon_attack_LOE_118\
|
||||
if(HSL_fake_weapon && flag(&(HSL_fake_weapon->state), weapon_attack_LOE_118_FLAG, FLAG_ISSET)) {\
|
||||
if(HSL_fake_weapon) { hsl_set_weapon_durability(HSL_fake_weapon, -1); if(hsl_weapon_durability(HSL_fake_weapon) == 0) { hsl_destroy_weapon(HSL_fake_weapon, HSL_fake_deck); } hsl_add_defender(HSL_fake_weapon, holder); } \
|
||||
}
|
||||
|
||||
#define __SECTION_WEAPON_ATTACK\
|
||||
weapon_attack_CS2_097\
|
||||
weapon_attack_LOE_118\
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef SECTION_WEAPON_DESTROYED_H_
|
||||
#define SECTION_WEAPON_DESTROYED_H_
|
||||
|
||||
#define weapon_destroyed_CS2_097\
|
||||
if(HSL_fake_weapon && flag(&(HSL_fake_weapon->state), weapon_destroyed_CS2_097_FLAG, FLAG_ISSET)) {\
|
||||
def(card_list_s, all) all = hsl_board_boss_cards(HSL_deck_player); def(card_list_s, itm) foreach(itm, all) { hsl_remove_attachment(HSL_deck_player, NULL, itm->card, CN_DIVINE_RAPIER_BONUS); hsl_change_attack(itm->card, -8); hsl_add_defender(itm->card, holder); } \
|
||||
}
|
||||
|
||||
#define weapon_destroyed_LOE_118\
|
||||
if(HSL_fake_weapon && flag(&(HSL_fake_weapon->state), weapon_destroyed_LOE_118_FLAG, FLAG_ISSET)) {\
|
||||
def(card_list_s, all) all = hsl_board_boss_cards(HSL_deck_player); def(card_list_s, itm) foreach(itm, all) { hsl_unset_windfury(itm->card); if(turn_plays(itm->card) > 0) { hsl_set_exhausted(itm->card); } hsl_add_defender(itm->card, holder); } \
|
||||
}
|
||||
|
||||
#define __SECTION_WEAPON_DESTROYED\
|
||||
weapon_destroyed_CS2_097\
|
||||
weapon_destroyed_LOE_118\
|
||||
|
||||
#endif
|
||||
@@ -70,7 +70,7 @@ if __name__ == "__main__":
|
||||
p = parser.parser()
|
||||
|
||||
cb = Bucket('couchbase://localhost/hbs', password='aci')
|
||||
loaded = cb.get('u:mod_dota').value
|
||||
loaded = cb.get('u:mod_woa').value
|
||||
|
||||
|
||||
for c in loaded['cards']:
|
||||
@@ -78,7 +78,7 @@ if __name__ == "__main__":
|
||||
for k in c:
|
||||
if k[0] == '__name':
|
||||
name = k[1]
|
||||
if k[0] == '__code': # code comes later than name
|
||||
if k[0] == '__code': # code comes laters than name
|
||||
p.parse_card(k[1], name)
|
||||
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user