Object-oriented: Curse - Suzuya - 01-05-2014
Hi again,
It took all day, but there it is! I'm talking about new, bugproof (I think) curse based on Hidan's ritual (yes, this one from Naruto).
This time I'm not gonna explain the code, because it's RLY complicated and crazy. :d
Instead I'm gonna just explain what it does in game. So, first of all, you need to hit with the ball some character (use arest!, because target's object number is stored in dark red hp, and there can't be two or more object numbers in one bar, I guess). After that, if anything hurts you, all cursed characters get damage equal to 50% of damage you get, and they go to frame 220, but you can delete this, because I think it will affect even lying characters, and that would look weird. (Damage is stored in mp bar if someone wants to know, but before and after this, mp bar stores creator's object number.) Of course, F7 will make the curse disappear, but someone could make F7 not affect type 3 objects, and that would fix this. Ok, here's the code and some implementation in data changer:
-state 311 from previous thread
Code: itr_effect_fall proc
mov eax,dword ptr ss:[esp+0Ch]
mov eax,dword ptr ds:[eax+2Ch] ;effect
cmp eax,75
je curse
Code: ;curse (stores target's object number in hp)
curse:
mov eax,dword ptr ds:[esi+edi*4+194h]
mov edx,dword ptr ds:[eax+368h]
cmp dword ptr ds:[edx+6F8h],3 ;type
je r3
cmp dword ptr ds:[edx+6F8h],0 ;type
jne p2
MOV EAX,DWORD PTR SS:[ESP+0Ch]
MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h] ;target
MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h] ;attacker
mov DWORD PTR DS:[EdX+300h],edi ;attacker's dhp
;mov DWORD PTR DS:[EdX+70h],100
mov eax,dword ptr ds:[esi+edi*4+194h]
jmp dword ptr [ef_r2]
Code: itr_kind8 proc
CMP EDX,914
JE curse_initiation
CMP EDX,915
JE curse
Code: ;curse initiation (set ball's hp the same as owner's hp)
curse_initiation:
MOV EAX,DWORD PTR SS:[ESP+0Ch]
MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
MOV eax,DWORD PTR DS:[EDX+308h]
mov edi,eax
MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
cmp byte ptr ds:[esi+edi+4],0
je x31
cmp edi,500
je x31
cmp DWORD PTR DS:[ECX+2FCh],0
jle x31
MOV EAX,DWORD PTR SS:[ESP+0Ch]
MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
MOV EcX,DWORD PTR DS:[EcX+2FCh] ;owner's hp
mov DWORD PTR DS:[EdX+2FCh],ecx
x32: mov eax,dword ptr ds:[esi+edi*4+194h]
JMP ik8_pos3
x31: mov DWORD PTR DS:[EDX+70h],67
jmp x32
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;curse
curse:
MOV EAX,DWORD PTR SS:[ESP+0Ch]
MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
MOV edi,DWORD PTR DS:[EDX+308h]
push edi
;jmp x42
;mov edi,eax
MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
cmp byte ptr ds:[esi+edi+4],0
je x41
cmp edi,500
je x41
;cmp DWORD PTR DS:[ECX+2FCh],0
;jle x41
;check owner's hp and if lower, than ball's hp, then store value in mp
mov DWORD PTR DS:[EDX+308h],0 ;set mp to 0
MOV ECX,DWORD PTR DS:[ECX+2FCh] ;owner's hp
MOV EDX,DWORD PTR DS:[EDX+2FCh]
cmp ecx,edx
jl x43
MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
mov DWORD PTR DS:[EDX+2FCh],ecx
jmp x44
x43:
mov eax,edx
push ebx
mov ebx,ecx
sub eax,ebx
pop ebx
MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
mov DWORD PTR DS:[EDX+2FCh],ecx
add DWORD PTR DS:[EDX+308h],eax ;store in mp, where was written owner's object number
MOV EAX,DWORD PTR SS:[ESP+0Ch]
x44:
;hit target by mp
MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
MOV eax,DWORD PTR DS:[EDX+300h]
mov edi,eax
MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
cmp byte ptr ds:[esi+edi+4],0
je x41
cmp edi,500
je x41
cmp DWORD PTR DS:[ECX+2FCh],0 ;target's hp
jle x41
FLD QWORD PTR DS:[ECX+58h]
MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
FSTP QWORD PTR DS:[EDX+58h]
MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
FLD QWORD PTR DS:[ECX+60h]
MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
FSTP QWORD PTR DS:[EDX+60h]
MOV EAX,DWORD PTR DS:[EDI*4+ESI+194h]
FLD QWORD PTR DS:[EAX+68h]
MOV ECX,DWORD PTR DS:[EBX*4+ESI+194h]
FADD QWORD PTR DS:[ik8_pos4]
FSTP QWORD PTR DS:[ECX+68h]
MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
MOV EDX,DWORD PTR DS:[EDX+308h]
cmp edx,0
je x42
push eax
push ebx
mov eax,edx
mov ebx,2 ;percent of damage, target will be hit (50%)
xor edx,edx
div ebx
mov edx,eax
pop ebx
pop eax
sub DWORD PTR DS:[ECX+2FCh],edx
cmp DWORD PTR DS:[ECX+2FCh],0 ;target's hp
jle x41
mov DWORD PTR DS:[ECX+70h],220
x42:
MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h] ;attacker
pop edi
;mov edi,eax
MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
MOV DWORD PTR DS:[EDX+308h],edi
cmp byte ptr ds:[esi+edi+4],0
je x45
cmp edi,500
je x45
cmp DWORD PTR DS:[ECX+2FCh],0
jle x45
;mov edi,DWORD PTR DS:[EDX+300h]
;MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
x46:
mov eax,dword ptr ds:[esi+edi*4+194h]
JMP ik8_pos3
x41:
MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
mov DWORD PTR DS:[EDX+70h],67
jmp x42
x45: mov DWORD PTR DS:[EDX+70h],67
jmp x46
And now some DC (changed john_ball):
DC-Code:
<frame> 0 flying
pic: 0 state: 311 wait: 1 next: 1 dvx: 0 dvy: 0 centerx: 40 centery: 41 hit_a: 0 hit_d: 0 hit_j: 0
<frame_end>
<frame> 1 flying
pic: 1 state: 3000 wait: 1 next: 2 dvx: 18 dvy: 0 centerx: 40 centery: 41 hit_a: 0 hit_d: 0 hit_j: 0
itr:
kind: 0 x: 22 y: 27 w: 55 h: 27 dvx: 0 fall: 0 arest: 10 bdefend: 70 injury: 0 effect: 75
itr_end:
<frame_end>
<frame> 2 flying
pic: 2 state: 3000 wait: 1 next: 3 dvx: 18 dvy: 0 centerx: 40 centery: 41 hit_a: 0 hit_d: 0 hit_j: 0
itr:
kind: 0 x: 22 y: 27 w: 55 h: 27 dvx: 0 fall: 0 arest: 10 bdefend: 70 injury: 0 effect: 75
itr_end:
<frame_end>
<frame> 3 flying
pic: 3 state: 3000 wait: 1 next: 4 dvx: 18 dvy: 0 centerx: 40 centery: 41 hit_a: 0 hit_d: 0 hit_j: 0
itr:
kind: 0 x: 22 y: 27 w: 55 h: 27 dvx: 0 fall: 0 arest: 10 bdefend: 70 injury: 0 effect: 75
itr_end:
<frame_end>
<frame> 4 flying
pic: 2 state: 3000 wait: 1 next: 5 dvx: 18 dvy: 0 centerx: 40 centery: 41 hit_a: 0 hit_d: 0 hit_j: 0
itr:
kind: 0 x: 22 y: 27 w: 55 h: 27 dvx: 0 fall: 0 arest: 10 bdefend: 70 injury: 0 effect: 75
itr_end:
<frame_end>
<frame> 5 flying
pic: 1 state: 3000 wait: 1 next: 1 dvx: 18 dvy: 0 centerx: 40 centery: 41 hit_a: 0 hit_d: 0 hit_j: 0
itr:
kind: 0 x: 22 y: 27 w: 55 h: 27 dvx: 0 fall: 0 arest: 10 bdefend: 70 injury: 0 effect: 75
itr_end:
<frame_end>
<frame> 100 forcefield
pic: 5 state: 3002 wait: 1 next: 101 dvx: 550 dvy: 0 centerx: 35 centery: 41 hit_a: 0 hit_d: 67 hit_j: 0
itr:
kind: 914 x: -1000 y: -113 w: 2000 h: 134 zwidth: 1000
itr_end:
<frame_end>
<frame> 101 forcefield
pic: 17 state: 3002 wait: 1 next: 101 dvx: 550 dvy: 0 centerx: 35 centery: 41 hit_a: 0 hit_d: 67 hit_j: 0
itr:
kind: 915 x: -1000 y: -113 w: 2000 h: 134 zwidth: 1000
itr_end:
<frame_end>
<frame> 10 hiting
pic: 4 state: 3001 wait: 1 next: 100 dvx: 0 dvy: 0 centerx: -10 centery: 41 hit_a: 0 hit_d: 0 hit_j: 0
<frame_end>
|
|