def __init__(self): for x in range(int(4)): x = randint(1, len(Consumable['17th Level'])) Con_treasure.append(Consumable['17th Level'][x]) if x == 6: Spells.spell_roll() for x in range(int(2)): x = randint(1, len(Consumable['18th Level'])) Con_treasure.append(Consumable['18th Level'][x])
def __init__(self): x = randint(1, len(Consumable['16th Level'])) Con_treasure.append(Consumable['16th Level'][x]) for x in range(2): x = randint(1, 2) if x == 1: x = randint(1, len(Consumable['16th Level'])) Con_treasure.append(Consumable['16th Level'][x]) else: x = randint(1, len(Consumable['17th Level'])) Con_treasure.append(Consumable['17th Level'][x]) if x == 6: Spells.spell_roll()
def outfit(self): a = genarmor(self.clas, self.level) self.armor = a[0] self.armorvalue = a[1] self.movement = a[2] m = genmeleeweapon(self.clas, self.level) self.meleeweapon = m[0] self.damage = m[2] if m[1] < 2: s = genshield(self.clas, self.level) self.shield = s[1] self.shieldvalue = s[2] if self.clas == 2: if Dice.D(1, 100) < min(95, self.level * 4): self.ringpro = Dice.tableroller(ringprobonus)[1] self.potion = genpotion(self.clas, self.level) self.scroll = genscroll(self.clas, self.level) if self.clas == 0 or self.clas == 2: # generate spells self.spells = Spells.genspells(self.clas, self.level) self.calc()
def NextPress(save=1): if FeatWindow: FeatWindow.Unload() if save: # resave the feats featCount = FeatReqTable.GetRowCount() if CharGen: pc = GemRB.GetVar("Slot") else: pc = GemRB.GameGetSelectedPCSingle() for i in range(featCount): GemRB.SetFeat(pc, i, GemRB.GetVar("Feat " + str(i))) if CharGen: GemRB.SetNextScript("Spells") else: # handle toughness first, since hp is tricky ToughnessDiff = GemRB.GetVar("Feat 69") - GemRB.GetVar( "BaseFeatValue 69") if ToughnessDiff > 0: pc = GemRB.GameGetSelectedPCSingle() GemRB.SetPlayerStat( pc, IE_MAXHITPOINTS, GemRB.GetPlayerStat(pc, IE_MAXHITPOINTS, 1) + ToughnessDiff * 3, 0) GemRB.SetPlayerStat( pc, IE_HITPOINTS, GemRB.GetPlayerStat(pc, IE_HITPOINTS, 1) + ToughnessDiff * 3, 0) # open up the next levelup window import Spells Spells.SetupSpellsWindow(0) return
def __init__(self): loot = [{'item': FireBlade, 'rate': 0.1}] spells = [Spells.FireBreath()] super(FireElemental, self).__init__('fire_elem', 50, 20, 5, 10, 30, loot, spells) self.name = 'Fire elemental {}'.format( FireElemental.Counter + 1 if FireElemental.Counter > 1 else "") FireElemental.Counter += 1
def __init__(self): x = randint(1, len(Consumable['9th Level'])) Con_treasure.append(Consumable['9th Level'][x]) if x == 12: Spells.spell_roll() for x in range(2): x = randint(1, 2) if x == 1: for x in range(int(b)): x = randint(1, len(Consumable['9th Level'])) Con_treasure.append(Consumable['9th Level'][x]) if x == 12: Spells.spell_roll() else: for x in range(int(c)): x = randint(1, len(Consumable['10th Level'])) Con_treasure.append(Consumable['10th Level'][x])
def genscroll(cclass, level): if Dice.D(1, 100) < (level * 3): scroll = Dice.tableroller(scrolltable[cclass])[1] if type(scroll) is tuple: scrollspells = Spells.genscroll(scroll[0], scroll[1]) scroll = "Scroll of %s Spells: %s" \ % (classnames[cclass], string.join(scrollspells, ", ")) return scroll return ""
def __init__(self): x = randint(1, len(Consumable['1st Level'])) Con_treasure.append(Consumable['1st Level'][x]) if x == 23: Spells.spell_roll() x = randint(1, len(Consumable['2nd Level'])) Con_treasure.append(Consumable['2nd Level'][x]) if x == 17: Spells.spell_roll() x = randint(1, len(Consumable['3rd Level'])) Con_treasure.append(Consumable['3rd Level'][x]) if x == 17: Spells.spell_roll()
def NextPress(save=1): GemRB.SetRepeatClickFlags(GEM_RK_DISABLE, OP_OR) if FeatWindow: FeatWindow.Unload() if CharGen: GemRB.SetNextScript("Spells") return if save: # resave the feats featCount = FeatReqTable.GetRowCount() pc = GemRB.GameGetSelectedPCSingle() for i in range(featCount): GemRB.SetFeat(pc, i, GemRB.GetVar("Feat " + str(i))) # open up the next levelup window import Spells Spells.SetupSpellsWindow(0) return
def __init__(self): super().__init__() self.name = 'Rilay' self.INT = 15 self.STR = 5 self.DEX = 10 self.DUR = 5 self.hp_multiplier = 1 self.mp_multiplier = 2 self.dmg_multiplier = 1 self.defence_multiplier = 1 self.exp_multiplier = 12 self.INT_INC = 2 self.STR_INC = 1 self.DEX_INC = 1 self.DUR_INC = 2 self._res_name = 'healer' self.recalculate_stats() self.load_sprites() self.spells.append(Spells.Heal())
def __init__(self): for x in range(int(2)): x = randint(1, len(Consumable['4th Level'])) Con_treasure.append(Consumable['4th Level'][x]) if x == 7: Spells.spell_roll() for x in range(int(6)): x = randint(1, len(Consumable['5th Level'])) Con_treasure.append(Consumable['5th Level'][x]) if x == 17: Spells.spell_roll() for x in range(int(2)): x = randint(1, len(Consumable['6th Level'])) Con_treasure.append(Consumable['6th Level'][x]) if x == 10: Spells.spell_roll()
def __init__(self): for x in range(int(1)): x = randint(1, len(Consumable['2nd Level'])) Con_treasure.append(Consumable['2nd Level'][x]) if x == 17: Spells.spell_roll() for x in range(2): x = randint(1, 2) if x == 1: x = randint(1, len(Consumable['2nd Level'])) Con_treasure.append(Consumable['2nd Level'][x]) if x == 17: Spells.spell_roll() else: x = randint(1, len(Consumable['3rd Level'])) Con_treasure.append(Consumable['3rd Level'][x]) if x == 17: Spells.spell_roll()
def MakeDamageSpell(self, file_path): with open(file_path) as data_file: data = json.load(data_file) for spell in data: a_spell = Spells.DamageSpell(data, spell, self) self.spells.append(a_spell)
def _genscroll(row): spells = Spells.genscroll(*row[2]) return (0, "%s: %s" % (row[1], string.join(spells, ", ")))
async def spell(ctx, *args): spell_string = combine_args(*args) await ctx.send(embed=Spells.get_spell(spell_string))
from Units import * from Spells import * magic_bolt = Spells(spell_id=10001, name='Волшебная стрела', damage=1, cooldown=3, duration=1, effect_type='buff_active', targets='single', school='magic', crit_type='damage', crit_strength=2) spell_2 = Spells(spell_id=31047, name='Подлый трюк', damage=1.5, cooldown=3, duration=1, effect_type='debuff', targets='single', school='physic', crit_type='damage', crit_strength=2) spell_3 = Spells(spell_id=21233, name='Аура боли', damage=0.5, cooldown=3, duration=0, effect_type=None, targets='AOE', school='physic',
enemy.outlineSelf() enemy.startingX -= Stages.stageHandler.currentStage.scrollSpeed enemy.leftAnchor = enemy.startingX enemy.rightAnchor = enemy.startingX + 300 #accounts enemies always moving onward as not to impose on previously completed stage enemy.drawMe() #print(f'this is the matter lis: {Stages.stageHandler.currentStage.matterList}') #print(f'stage one boss {Stages.stage_one.boss}') #print(f'current Stage: {Stages.stageHandler.currentStage.name}') #print(f'current Stage enemies List: {Stages.stageHandler.currentStage.enemiesList}') Stages.stageHandler.drawConsumables() Stages.stageHandler.drawEffects() Stages.stageHandler.drawExplosives() #drawingSpells to screen Spells.showSpells() #drawEnemyDisplay() if Stages.stageHandler.currentStage.scrolling: HeroClassCode.player.currentX -= Stages.stageHandler.currentStage.scrollSpeed #print(HeroClassCode.Piles.humanoidName) HeroClassCode.Piles.followPlayer() HeroClassCode.player.checkPickup() HeroClassCode.report_player_health() HeroClassCode.player.draw_player() HeroClassCode.draw_player_interface() Controls.playerControls() #draw death screen if player is dead