def dragonburst(attacker, defender): check_energy_cost(attacker, 2, Fire=1, Electric=1) energy_type = attacker.player.prompt_select_other( [get("fire"), get("electric")]).id damage = attacker.energy[energy_type.title()] * 60 for _ in range(attacker.energy[energy_type.title()]): attacker.player.discard.append(energy_type.lower()) attacker.energy.pop(energy_type.title()) attacker.other_attached = [ i for i in attacker.other_attached if i != energy_type ] defender.take_damage(damage, attacker)
def energyloop(attacker, defender): check_energy_cost(attacker, 1, Metal=1) defender.take_damage(30, attacker) energy = attacker.player.prompt_select_other(attacker.energy) attacker.energy[energy] -= 1 if attacker.energy[energy] == 0: attacker.energy.pop(energy) if energy.upper() in Type.__members__: attacker.player.hand.append(get(energy.lower(), attacker.player)) else: for id in attacker.special_energy: c = get(id) if energy in c.name: attacker.player.hand.append(c) break
def energyretrieval(item): for _ in range(2): card = item.player.prompt_select_other( [get(i, item.player) for i in item.player.discard], "isenergy", "basic") item.player.hand.append(card) item.player.discard.remove(card.id)
def fisherman(item): for _ in range(4): energy = item.player.prompt_select_other( [get(i, item.player) for i in item.player.discard], "isenergy", "basic") item.player.deck.append(energy.id) item.player.discard.remove(energy.id)
def brockgrit(item): for _ in range(6): card = item.player.prompt_select_other([get(i) for i in item.player.discard], "ispokemon", "isenergy", basic="energy") item.player.deck.stack.append(card.id) item.player.discard.remove(card.id) item.player.deck.shuffle_curr()
def shoutofpower(attacker, defender): check_energy_cost(attacker, 1, Fighting=1) defender.take_damage(20, attacker) energy = attacker.player.prompt_select_other( [get(i) for i in attacker.player.discard], "isenergy", "remove") to = attacker.player.prompt_select_ally("notactive") if energy.upper() in Type.__members__: c = get(energy, attacker.player) c.override_cap = True c.use(to) else: for id in attacker.special_energy: c = get(id, attacker.player) if energy in c.name: c.data["overridecap"] = True c.data["target"] = to c.use() break
def ycyclone(attacker, defender): check_energy_cost(attacker, 3, Dark=1) defender.take_damage(90, attacker) to = attacker.player.prompt_select_ally("notactive") energy = attacker.player.prompt_select_other(attacker.energy.as_card_list()) attacker.energy[energy] -= 1 if attacker.energy[energy] == 0: attacker.energy.pop(energy) if energy.upper() in Type.__members__: c = get(energy, attacker.player) c.override_cap = True c.use(to) else: for id in attacker.special_energy: c = get(id, attacker.player) if energy in c.name: c.data["overridecap"] = True c.data["target"] = to c.use() break
def unassigned_ids(self): self.check_login() unassigned = list() self.logged_in_headers['X-HTTP-Method-Override'] = 'GET' r = self.s.post("https://utas.s2.fut.ea.com/ut/game/fifa14/purchased/items",headers=self.logged_in_headers) try: data = r.json()['itemData'] except: return [],30 for card in data: unassigned.append(card.get('id')) return unassigned, len(unassigned)
def shiftgear(user): # user.player.global_abilities.append("shiftgear") _from = user.player.prompt_select_ally(has_energy="metal") energy = user.player.prompt_select_other(_from.energy.as_card_list(), _type="metal") to = user.player.prompt_select_ally() _from.energy[energy] -= 1 if _from.energy[energy] == 0: _from.energy.pop(energy) if energy.lower() == "metal": c = get(energy, user.player) c.override_cap = True c.use(to) else: for id in _from.special_energy: c = get(id, user.player) if energy in c.name: c.data["overridecap"] = True c.data["target"] = to c.use() break
def oblivionwing(attacker, defender): check_energy_cost(attacker, 1, Dark=1) defender.take_damage(30, attacker) energy = attacker.player.prompt_select_other( attacker.player.discard, "isenergy", "remove", _type="Dark" ) to = attacker.player.prompt_select_ally("notactive") if energy.upper() in Type.__members__: c = get(energy, attacker.player) c.override_cap = True c.use(to) else: for id in attacker.special_energy: c = get(id, attacker.player) if energy in c.name: c.data["overridecap"] = True c.data["target"] = to c.use() break
def crimsonflamepillar(attacker, defender): if attacker.player.gx_used: return check_energy_cost(attacker, 1, Fire=1) for _ in range(5): energy = attacker.player.prompt_select_other( [get(i) for i in attacker.player.discard], "isenergy", "basic") target = attacker.player.prompt_select_ally() energy.override_cap = True energy.use(target) if attacker.energy.total() >= 2: defender.rotation = "confused" defender.tokens.append("burned")
def spreadingflames(attacker, defender): check_energy_cost(attacker, 1) for _ in range(3): if "fire" not in attacker.player.discard: return energy = attacker.player.prompt_select_other([get(i, attacker.player) for i in attacker.player.discard], "isenergy", _type="fire") target = attacker.player.prompt_select_ally() if "-" in energy.id: energy.data["overridecap"] = True energy.data["target"] = target energy.use() else: energy.override_cap = True energy.use(target) attacker.player.discard.remove(energy.id)
def dynamotor(user): if "dynamotor" in user.one_time_used: return if "electric" not in user.player.discard: # and somehow check for special electric energy return energy = user.player.prompt_select_other( [get(i, user.player) for i in user.player.discard], "isenergy", _type="electric") target = user.player.prompt_select_ally("notactive") if "-" in energy.id: energy.data["overridecap"] = True energy.data["target"] = target energy.use() else: energy.override_cap = True energy.use(target) user.player.discard.remove(energy.id) user.one_time_used.append("dynamotor")
def firestarter(user): if "firestarter" in user.one_time_used: return if "fire" not in user.player.discard: return energy = user.player.prompt_select_other( [get(i, user.player) for i in user.player.discard], "isenergy", _type="fire") target = user.player.prompt_select_ally("notactive") if "-" in energy.id: energy.data["overridecap"] = True energy.data["target"] = target energy.use() else: energy.override_cap = True energy.use(target) user.player.discard.remove(energy.id) user.one_time_used.append("firestarter")
def prompt_card_from_deck(self, *args, **kwargs): card = self.prompt_select_other([get(i, self) for i in self.deck.stack], *args, **kwargs) self.deck.stack.remove(card.id) self.deck.shuffle_curr() return card
def draw(self): return get(self.stack.pop(0), self.player)
def pull_prize(self): if len(self.prize) == 0: self.win() raise GameWon("player wins" if self.ai is None else "ai wins") return get(self.prize.pop(), self)
def lusamine(item): for _ in range(2): card = item.player.prompt_select_other([get(i, item.player) for i in item.player.discard], "issupporter", "isstadium") item.player.hand.append(card) item.player.discard.remove(card.id)
def palpad(item): for _ in range(2): supp = item.player.prompt_select_other([get(i, item.player) for i in item.player.discard], "issupporter") item.player.discard.remove(supp.id) item.player.deck.stack.append(supp.id) item.player.deck.shuffle_curr()