Fusion
mob
proc
FuseMerge(var/mob/M)
if(get_dist(src,M)==2)
if(src.fly==1)
src.Fly()
if(M.fly==1)
M.Fly()
if(src.PL>M.PL*1.5||src.PL<M.PL*0.5||M.hand==0||src.hand==0)
src.canMove=1
src.blockable=1
src.skillactive=0
src.flyable=1
src.attacking=0
src.stanceable=1
src.mfusing=0
M.mfusing=0
M.canMove=1
M.blockable=1
M.skillactive=0
M.flyable=1
M.east=0
M.west=0
src.east=0
src.west=0
M.attacking=0
M.stanceable=1
src<<"The fusion failed, your power was too unbalanced"
M<<"The fusion failed, your power was too unbalanced"
return
if(src.race<>M.race)
M.canMove=1
M.blockable=1
M.skillactive=0
M.flyable=1
M.east=0
M.west=0
src.east=0
src.west=0
M.attacking=0
M.stanceable=1
src.mfusing=0
M.mfusing=0
src.canMove=1
src.blockable=1
src.skillactive=0
src.flyable=1
src.attacking=0
src.stanceable=1
src<<"The fusion failed, both participants need to be of the same race"
M<<"The fusion failed, both participants need to be of the same race"
return
if(src.android==1||M.android==1)
M.canMove=1
M.blockable=1
M.skillactive=0
M.flyable=1
M.attacking=0
M.stanceable=1
M.east=0
M.west=0
src.east=0
src.west=0
src.canMove=1
src.mfusing=0
M.mfusing=0
src.blockable=1
src.skillactive=0
src.flyable=1
src.attacking=0
src.stanceable=1
src<<"The fusion failed, because only living creatures can fuse, you or your partner are androids"
M<<"The fusion failed, because only living creatures can fuse, you or your partner are androids"
return
show_fball(src)
src.fly=1
show_fball(M)
M.fly=1
src.oldloc=src.loc
M.oldloc=M.loc
var/newloc
var/newdir=get_dir(src,M)
if(newdir==NORTHEAST)
newloc=locate(src.x+1,src.y+1,src.z)
if(newdir==NORTHWEST)
newloc=locate(src.x-1,src.y+1,src.z)
if(newdir==SOUTHEAST)
newloc=locate(src.x+1,src.y-1,src.z)
if(newdir==SOUTHWEST)
newloc=locate(src.x-1,src.y-1,src.z)
if(newdir==EAST)
newloc=locate(src.x+1,src.y,src.z)
if(newdir==WEST)
newloc=locate(src.x-1,src.y,src.z)
if(newdir==NORTH)
newloc=locate(src.x,src.y+1,src.z)
if(newdir==SOUTH)
newloc=locate(src.x,src.y-1,src.z)
var/mob/A=new/mob/Fusion_Body(newloc)
src.fusionhbar()
M.fusionhbar()
spawn(29)
show_fball(A)
src.fusebody=A
A.incontrol=src
A.fusebody=A
M.fusebody=A
src.client:perspective = EYE_PERSPECTIVE
src.client.eye = A
//M.client.focus=null
M.client.perspective=EYE_PERSPECTIVE
M.client.eye = A
A.contents+=M
A.contents+=src
src.mfused=1
//src.fusebody=A
//M.fusebody=A
M.mfused=1
A.mfused=1
A.hairon=1
A.auracolors = pick(src.auracolors,M.auracolors)
A.auraicon+=A.auracolors
A.blastcolor = pick(src.blastcolor,M.blastcolor)
A.blast1+=A.blastcolor
A.blast2+=A.blastcolor
A.blast3='Blast.dmi'
if(src.icon==src.muscleicon||M.icon==M.muscleicon)
A.muscleicon=src.muscleicon
A.icon=src.muscleicon
else
A.icon=pick(src.old_icon,M.old_icon)
A.basehair=pick(src.basehair,M.basehair)
A.hair=pick(src.hair,M.hair)
if(A.basehair==src.basehair)
A.hair=src.basehair
A.sshair=src.sshair
A.ss2hair=src.ss2hair
if(A.basehair==M.basehair)
A.hair=M.basehair
A.sshair=M.sshair
A.ss2hair=M.ss2hair
A.hair+=M.haircolor
A.hair+=src.haircolor
A.overlays+=A.hair
A.canMove=1
A.ingame=1
A.race=src.race
A.class=pick(src.class,M.class)
if(src.saiyan==1)
A.saiyan=1
if(src.tail==1)
A.overlays+='Tail.dmi'
if(src.lsaiyan==1)
A.lsaiyan=1
if(src.tail==1)
A.overlays+='Tail.dmi'
if(src.namekian==1)
A.namekian=1
if(src.majin==1)
A.majin=1
A.MajinRegen()
if(src.kai==1)
A.kai=1
if(src.human==1)
A.human=1
A.class=src.class
A.ReqFind()
A.Level=round((src.Level+M.Level)*1.25,1)
A.BasePL=(src.BasePL+M.BasePL)*3.5
A.PL=A.BasePL
if(A.saiyan==1||A.lsaiyan==1)
if(src.ssable==1||M.ssable==1)
A.ssable=1
if(src.lssable==1||M.lssable==1)
A.lssable=1
if(src.ss2able==1||M.ss2able==1)
A.ss2able=1
if(src.ss3able==1||M.ss3able==1)
A.ss3able=1
if(src.ss4able==1||M.ss4able==1)
A.ss4able=1
if(A.PL>A.ssjreq*10)
A.sstranstime=0
A.sstrans=1
A.Transform()
A.Strength=(src.Strength+M.Strength)*2
A.Defence=(src.Defence+M.Defence)*2
A.EnergyStrength=(src.EnergyStrength+M.EnergyStrength)*2
A.EnergyDefence=(src.EnergyDefence+M.EnergyDefence)*2
A.MaxStamina=(src.MaxStamina+M.MaxStamina)*2
A.MaxHP=(src.MaxHP+M.MaxHP)*2
A.HP=A.MaxHP
A.baramt=min(src.baramt+M.baramt,1183)
A.Stamina=A.MaxStamina
A.critchance=(src.critchance+M.critchance)*0.75
A.crit=src.crit+M.crit
A.redmin=src.redmin+M.redmin
A.red=src.red+M.red
A.addmin=src.addmin+M.addmin
A.add=src.add+M.add
A.eredmin=src.eredmin+M.eredmin
A.ered=src.ered+M.ered
A.eaddmin=src.eaddmin+M.eaddmin
A.eadd=src.eadd+M.eadd
A.hpregen=src.hpregen
A.hpregen=src.hpregen+M.hpregen
A.refill=src.refill
if(A.refill==1||M.refill==1)
A.refill=1
A.Refill()
A.luck=(src.luck+M.luck)*0.75
A.dodge=src.dodge+M.dodge
A.adelay=src.adelay+M.adelay
if(A.adelay>0)
A.adelay/=2
else
A.adelay=0.1
A.chargespeed=(src.chargespeed+M.chargespeed)*0.75
if(M.ragable==1||src.ragable==1)
A.ragable=1
A.rageboost=(src.rageboost+M.rageboost)
A.ragestatboost=(src.ragestatboost+M.ragestatboost)
A.MaxRage=(src.MaxRage+M.MaxRage)*2
A.Rage=(src.Rage+M.Rage)*2
if(src.lastable||M.lastable)
A.lastable=1
A.lastchance=src.lastchance+M.lastchance
A.blockable=1
A.canMove=1
A.flyable=1
A.stanceable=1
A.attacking=0
A.skillactive=0
M.blockable=1
M.flyable=1
M.attacking=0
M.stanceable=1
M.mfusing=0
src.mfusing=0
src.blockable=1
src.skillactive=0
src.flyable=1
src.attacking=0
src.stanceable=1
var/namepart=""
/*A.part1=src.name
A.part2=M.name
var/name1=(length(src.name))/2
var/name2=(length(M.name))/2
for(var/i=0,i<=name1,i++)
namepart+=A.part1[i]
var/start=name2+1
for(var/i=start,i<=name2,i++)
namepart+=A.part2[i]*/
if(namepart)
A.name=namepart
else
A.name=src.fusionname
src.fusedname=A.name
M.fusedname=A.name
A<<"The fusion will come undone in 10 minutes or if one of the two fused players logs out"
M<<"The fusion will come undone in 10 minutes or if one of the two fused players logs out"
A.sparklegen()
spawn(10)
A.sparklegen()
spawn(10)
A.sparklegen()
spawn(10)
A.sparklegen()
show_fball(A)
view(A)<<"[M] and [src] have fused to become one powerul warrior"
view(A)<<"[A.name] has been born!"
Movement Code
mob
on_cross(atom/obstacle, r)
if(obstacle.density==1 && obstacle.unpassable==0)
if(fly)
if(ismob(obstacle))
var/mob/M=obstacle
if(M.fly)
return 0
return 1
else
return 0
if(fly)
if(obstacle.unpassable==0)
return 1
else
return 0
. = ..()
on_uncross(atom/obstacle, r)
if(obstacle.density==1 && obstacle.unpassable==0)
if(fly)
return 1
else
return 0
if(fly)
if(obstacle.unpassable==0)
return 1
else
return 0
. = ..()
Problem description:
Yes, another generic dbz game v_v. My problem is that everything works lickity split, except movement, which doesnt work at all whilst fused. i.e(i use falacy's keyboard library)