def unit_gen(): t=unit.token() t.speed=80 t.model.append(model.火球()) t.die_model=model.爆炸(t=0.2,r=50) t.add_ef(effect.bomb(r=30,power=40)) t.add_ef(effect.closing()) return t
def act(self,x,y): t=self.summon(unit.token(),2.3,x,y) t.model.append(model.吟唱()) self.summon(unit.decorator(model=model.扩散白圈(t=0.3,r=self.r,reverse=True)),x=x,y=y) tar_pool=list(filter(lambda i: not i.imm() and (t.v-i.v).mo()<self.r , unit.unit_pool)) for i in tar_pool: t.add_ef(effect.eat(eat_unit=i))
def act(self): # self.owner.add_ef(effect.slow(life_time=self.last_time,percent=0.5)) mg=self.owner.magic q=mg.replace('q',焚己以终()) w=mg.replace('w',沉默风暴()) e=mg.replace('e',紫水晶的叹息()) def f(): mg.replace('q',q) mg.replace('w',w) mg.replace('e',e) self.owner.add_ef(effect.timer(self.last_time,f)) for i in range(5): t=self.summon(unit.token(),self.last_time) t.speed=150 t.add_ef(effect.fire(r=66,power=100,ali_dam=False)) t.add_ef(effect.go666(center_unit=self.owner, r=300))
hero.hero.birth = hero_init() #放置双方防御塔和出兵点 def create(player, u, x, y): u.set_v(x, y) u.player = player unit.unit_pool.append(u) return u create(1, unit.tower(), 480, size[1] - 400) create(1, unit.tower(), 1080, size[1] - 1000) create(1, unit.tower(), 1680, size[1] - 1600) create(1, unit.token(), 100, size[1] - 100).add_ef(effect.unit_gen(unit=unit.soldier, cd=20, mult=4)) create(2, unit.tower(), size[0] - 480, 400) create(2, unit.tower(), size[0] - 1080, 1000) create(2, unit.tower(), size[0] - 1680, 1600) create(2, unit.token(), size[0] - 100, 100).add_ef(effect.unit_gen(unit=unit.soldier, cd=20, mult=4)) #放置石头 def s(r, x, y): t = unit.stone(r) t.set_v(x, y) unit.unit_pool.append(t)
def act(self,x,y): t=self.summon(unit.token(),2.4,x,y) t.add_ef(effect.fire(r=100,power=80))
def act(self,x,y): t=self.summon(unit.token(),x=x,y=y) t.die_model=model.爆炸(t=0.2,r=144) t.add_ef(effect.timer(t=2, func=t.die )) t.add_ef(effect.bomb(r=-1,power=80,aoe=True,aoe_r=144))
def act(self,x,y): t=self.summon(unit.token()) t.speed=160 t.add_ef(effect.fire(r=144,power=200,ali_dam=False)) t.add_ef(effect.closing()) self.owner.add_ef(effect.continue_cast(t=30,die_func=lambda: t.die()))
def act(self,x,y): r=155 t=self.summon(unit.token(),7,x,y) t.add_ef(effect.aura(r=r, color=(50,150,0), generator=lambda: effect.silence(life_time=0) )) t.add_ef(effect.aura(r=r, color=(50,150,0), generator=lambda i: effect.slow(percent=0.4+0.4*((t.v-i.v).mo()/r),life_time=0) ))
def f(): t=self.summon(unit.token(),self.last_time,x,y) t.add_ef(effect.fire(r=self.r,power=self.power))
def act(self,x,y): t=self.summon(unit.token(),8,x,y) t.add_ef(effect.aura(r=100, generator=lambda: effect.slow(life_time=0,percent=0.7)))