Beispiel #1
0
    def init_buffs(self):
        self.buffs = []

        def _effect_manafication(RDM):
            RDM.white_mana *= 2
            RDM.black_mana *= 2

        self.buffs.append(
            Buff.Buff({
                "name": "Manafication",
                "effect": _effect_manafication,
                "recast": 11000,
                "weave_cost": 1,
            }))

        def _effect_acceleration(RDM):
            RDM.acceleration = 3

        self.buffs.append(
            Buff.Buff({
                "name": "Acceleration",
                "effect": _effect_acceleration,
                "recast": 5500,
                "weave_cost": 1,
            }))
Beispiel #2
0
    def __init__(self, boardName,playerName):
        with open(('../Boards/'+boardName+'.json'),'r') as f:
            data = json.load(f)
            w = data['width']
            h = data['height']
            buffs = data['buffs']
            walls = data['walls']
            rPlayers = data['rPlayers']
            bPlayers = data['bPlayers']
        self.playerList = []
        self.gameBoard = [ [defaultTile() for i in range(w)] for j in range(h)]
        #initialize all buffs
        for i in range(0,len(buffs)):
            if len(buffs[i]) == 6:
                buffs[i] = Buff.Heal(buffs[i][0],buffs[i][1],buffs[i][2],buffs[i][3],buffs[i][4],buffs[i][5])
            elif len(buffs[i]) == 4:
                buffs[i] = Buff.Heal(buffs[i][0],buffs[i][1],buffs[i][2],buffs[i][3])
            else:
                buffs[i] = Buff.Heal(buffs[i][0],buffs[i][1])

        #adding everything to the gameBoard
        for y in range(0,h):
            for x in range(0,w):
                for wall in walls:
                    if wall[0] == x and wall[1] == y:
                        self.gameBoard[y][x] = Wall(wall[0],wall[1])
                        break
                if isinstance(self.gameBoard[y][x],defaultTile):
                    for b in buffs:
                        if b.x == x and b.y == y:
                            self.gameBoard[y][x] = b
                            break

        customPlayerMod = importlib.import_module(playerName)
        #adding all players to the playerMap
        for p in bPlayers:
            self.playerList.append(customPlayerMod.CustomPlayer(p[0],p[1],'blue'))
        for p in rPlayers:
            self.playerList.append(customPlayerMod.CustomPlayer(p[0],p[1],'red'))
Beispiel #3
0
 def addBuff(self, duration):
     self.buff = Buff.StunBuff(duration)
Beispiel #4
0
 def addBuff(self, duration, percent):
     self.buff = Buff.WeakenBuff(duration, percent)
Beispiel #5
0
 def addBuff(self, duration, percent):
     self.buff = Buff.ProtectionBuff(duration, percent)
Beispiel #6
0
 def addBuff(self, duration, percent):
     self.buff = Buff.FlexBuff(duration, percent)
Beispiel #7
0
 def addBuff(self,duration, percent):
     self.buff = Buff.HealMissBuff(duration, percent)
Beispiel #8
0
 def addBuffs(self, c1, c2):
     if(random.random()<0.70):
         Buff.Buff.addOrReplaceBuff(c1, Buff.ProtectionBuff(1,20))
Beispiel #9
0
 def addBuffs(self, c1, c2):
     if(random.random()<0.9):
         Buff.Buff.addOrReplaceBuff(c2, Buff.DrainBuff(2,7))
Beispiel #10
0
 def addBuffs(self, c1, c2):
     if(random.random()<0.70):
         Buff.Buff.addOrReplaceBuff(c2, Buff.WeakenBuff(2, 40))
Beispiel #11
0
 def addBuffs(self, c1, c2):
     if(random.random()<0.70):
         Buff.Buff.addOrReplaceBuff(c2, Buff.BurnBuff(3,3))
Beispiel #12
0
from Buff import *

botd = Buff( )
botd.name = ""
botd.is_volatile = False
botd.max_duration = 3000

lotd = Buff( )
lotd.name = "Life"
lotd.max_duration = 3000

eyes = Buff( )
eyes.name = "Eyes"
eyes.is_volatile = False
eyes.is_stackable = True
eyes.max_stacks = 2
eyes.cur_stacks = 0

disembowel_buff = Buff( )
disembowel_buff.is_general = True
disembowel_buff.name = "Disembowel"
disembowel_buff.max_duration = 2400

chaos_thrust_dot = Dot( )
chaos_thrust_dot.name = "Chaos Dot"
chaos_thrust_dot.potency = 45
chaos_thrust_dot.max_duration = 2400

raiden_ready = Buff( )
raiden_ready.name = "Raiden Ready"
raiden_ready.max_duration = 1000