mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Fixed a rounding error in Glovz's damage formula
Minor edit to gl_partycontrol script. Updated Russian and Germen translations.
This commit is contained in:
Binary file not shown.
@@ -172,7 +172,7 @@ procedure start begin
|
|||||||
if (controlMode > 0) then begin
|
if (controlMode > 0) then begin
|
||||||
displayName := GetConfig("CombatControl", "DisplayName", 0);
|
displayName := GetConfig("CombatControl", "DisplayName", 0);
|
||||||
|
|
||||||
if displayName then begin
|
if (displayName) then begin
|
||||||
variable nameTag := add_iface_tag;
|
variable nameTag := add_iface_tag;
|
||||||
debug_msg("NPC control - added new box: " + nameTag);
|
debug_msg("NPC control - added new box: " + nameTag);
|
||||||
if (nameTag <= 0) then begin // box added?
|
if (nameTag <= 0) then begin // box added?
|
||||||
@@ -199,6 +199,8 @@ procedure start begin
|
|||||||
register_hook_proc(HOOK_GAMEMODECHANGE, GameModeChange_Handler);
|
register_hook_proc(HOOK_GAMEMODECHANGE, GameModeChange_Handler);
|
||||||
register_hook_proc(HOOK_INVENTORYMOVE, InventoryMove_Handler);
|
register_hook_proc(HOOK_INVENTORYMOVE, InventoryMove_Handler);
|
||||||
register_hook_proc(HOOK_INVENWIELD, InvenWield_Handler);
|
register_hook_proc(HOOK_INVENWIELD, InvenWield_Handler);
|
||||||
|
end else begin
|
||||||
|
exit;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -20,3 +20,20 @@ PartyOrderAttackRobot=::Piep::
|
|||||||
RaceText=Geschlecht
|
RaceText=Geschlecht
|
||||||
StyleText=Stil
|
StyleText=Stil
|
||||||
DoneBtn=OK
|
DoneBtn=OK
|
||||||
|
|
||||||
|
;Custom names for player's unarmed attacks (max 16 characters)
|
||||||
|
[Unarmed]
|
||||||
|
;Punch=Boxen:
|
||||||
|
;Kick=Tretten:
|
||||||
|
;StrongPunch=Starker Hieb:
|
||||||
|
;HammerPunch=Hammerschlag:
|
||||||
|
;Haymaker=Heumacher:
|
||||||
|
;Jab=
|
||||||
|
;PalmStrike=
|
||||||
|
;PiercingStrike=
|
||||||
|
;StrongKick=Starker Tritt:
|
||||||
|
;SnapKick=
|
||||||
|
;PowerKick=
|
||||||
|
;HipKick=
|
||||||
|
;HookKick=
|
||||||
|
;PiercingKick=
|
||||||
|
|||||||
@@ -20,3 +20,20 @@ PartyOrderAttackRobot=::
|
|||||||
RaceText=Раса
|
RaceText=Раса
|
||||||
StyleText=Стиль
|
StyleText=Стиль
|
||||||
DoneBtn=Закрыть
|
DoneBtn=Закрыть
|
||||||
|
|
||||||
|
;Имена для невооруженных атак игрока (макс. 16 символов)
|
||||||
|
[Hits]
|
||||||
|
;Punch=Удар рукой:
|
||||||
|
;Kick=Удар ногой:
|
||||||
|
;StrongPunch=
|
||||||
|
;HammerPunch=
|
||||||
|
;Haymaker=
|
||||||
|
;Jab=
|
||||||
|
;PalmStrike=
|
||||||
|
;PiercingStrike=
|
||||||
|
;StrongKick=
|
||||||
|
;SnapKick=
|
||||||
|
;PowerKick=
|
||||||
|
;HipKick=
|
||||||
|
;HookKick=
|
||||||
|
;PiercingKick=
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ void __fastcall Render::GNW_win_refresh(fo::Window* win, RECT* updateRect, BYTE*
|
|||||||
}
|
}
|
||||||
surface = &win->surface[currRect->wRect.left - win->rect.x] + ((currRect->wRect.top - win->rect.y) * win->width);
|
surface = &win->surface[currRect->wRect.left - win->rect.x] + ((currRect->wRect.top - win->rect.y) * win->width);
|
||||||
} else {
|
} else {
|
||||||
surface = new BYTE[height * width](); // black background
|
surface = new BYTE[height * width](); // black background (for main menu)
|
||||||
widthFrom = width; // replace with rectangle
|
widthFrom = width; // replace with rectangle
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+23
-30
@@ -47,22 +47,22 @@ void DamageMod::DamageGlovz(fo::ComputeAttackResult &ctd, DWORD &accumulatedDama
|
|||||||
mov edi, accumulatedDamage;
|
mov edi, accumulatedDamage;
|
||||||
begin:
|
begin:
|
||||||
mov mValue, 0; // clear value
|
mov mValue, 0; // clear value
|
||||||
mov edx, dword ptr ds:[esi + 4]; // get the hit mode of weapon being used by an attacker
|
mov edx, dword ptr ds:[esi + 4]; // get the hit mode of weapon being used by the attacker
|
||||||
mov eax, dword ptr ds:[esi]; // get pointer to critter attacking
|
mov eax, dword ptr ds:[esi]; // get pointer to critter attacking
|
||||||
call fo::funcoffs::item_w_damage_; // get the raw damage value
|
call fo::funcoffs::item_w_damage_; // get the raw damage value
|
||||||
mov ebx, bonusRangedDamage; // get the bonus ranged damage value
|
mov ebx, bonusRangedDamage; // get the bonus ranged damage value
|
||||||
cmp ebx, 0; // compare the range bonus damage value to 0
|
test ebx, ebx; // compare the range bonus damage value to 0
|
||||||
jle rdJmp; // if the RB value is less than or equal to 0 then goto rdJmp
|
jle rdJmp; // if the RB value is less than or equal to 0 then goto rdJmp
|
||||||
add eax, ebx; // add the RB value to the RD value
|
add eax, ebx; // add the RB value to the RD value
|
||||||
rdJmp:
|
rdJmp:
|
||||||
cmp eax, 0; // compare the new damage value to 0
|
test eax, eax; // compare the new damage value to 0
|
||||||
jle noDamageJmp; // goto noDamageJmp
|
jle noDamageJmp; // goto noDamageJmp
|
||||||
mov ebx, eax; // set the ND value
|
mov ebx, eax; // set the ND value
|
||||||
mov edx, armorDT; // get the armorDT value
|
mov edx, armorDT; // get the armorDT value
|
||||||
cmp edx, 0; // compare the armorDT value to 0
|
test edx, edx; // compare the armorDT value to 0
|
||||||
jle bJmp; // if the armorDT value is less than or equal to 0 then goto bJmp
|
jle bJmp; // if the armorDT value is less than or equal to 0 then goto bJmp
|
||||||
mov eax, dword ptr ammoY; // get the ammoY value
|
mov eax, dword ptr ammoY; // get the ammoY value
|
||||||
cmp eax, 0; // compare the ammoY value to 0
|
test eax, eax; // compare the ammoY value to 0
|
||||||
jg aJmp; // if the ammoY value is greater than 0 then goto aJmp
|
jg aJmp; // if the ammoY value is greater than 0 then goto aJmp
|
||||||
mov eax, 1; // set the ammoY value to 1
|
mov eax, 1; // set the ammoY value to 1
|
||||||
aJmp:
|
aJmp:
|
||||||
@@ -72,16 +72,10 @@ aJmp:
|
|||||||
jg grThan; // the dividend is greater than the divisor then goto grThan
|
jg grThan; // the dividend is greater than the divisor then goto grThan
|
||||||
jmp setOne; // if the two values are equal then goto setOne
|
jmp setOne; // if the two values are equal then goto setOne
|
||||||
lrThan:
|
lrThan:
|
||||||
mov ecx, edx; // store the dividend value temporarily
|
shl edx, 1; // multiply dividend value by 2
|
||||||
imul edx, 2; // multiply dividend value by 2
|
cmp edx, eax; // compare the dividend value to the divisor value
|
||||||
sub edx, eax; // subtract divisor value from the dividend value
|
jle setZero; // if the dividend value is less than or equal to the divisor value then goto setZero
|
||||||
cmp edx, 0; // compare the result to 0
|
jmp setOne; // if the dividend value is greater than the divisor value then goto setOne
|
||||||
jl setZero; // if the result is less than 0 then goto setZero
|
|
||||||
jg setOne; // if the result is greater than 0 then goto setOne
|
|
||||||
mov edx, ecx; // restore dividend value
|
|
||||||
and edx, 1; // if true (1) then odd if false (0) then even
|
|
||||||
jz setZero; // if the result is equal to 0 then setZero
|
|
||||||
jmp setOne; // if the result is not 0 then goto setOne
|
|
||||||
grThan:
|
grThan:
|
||||||
mov ecx, eax; // assign the divisor value
|
mov ecx, eax; // assign the divisor value
|
||||||
xor eax, eax; // clear value
|
xor eax, eax; // clear value
|
||||||
@@ -90,15 +84,14 @@ bbbJmp:
|
|||||||
sub edx, ecx; // subtract the divisor value from the dividend value
|
sub edx, ecx; // subtract the divisor value from the dividend value
|
||||||
cmp edx, ecx; // compare the remainder value to the divisor value
|
cmp edx, ecx; // compare the remainder value to the divisor value
|
||||||
jge bbbJmp; // if the remainder value is greater or equal to the divisor value then goto bbbJmp
|
jge bbbJmp; // if the remainder value is greater or equal to the divisor value then goto bbbJmp
|
||||||
|
test edx, edx; // compare the remainder value to 0
|
||||||
jz endDiv; // if the remainder value is equal to 0 then goto endDiv
|
jz endDiv; // if the remainder value is equal to 0 then goto endDiv
|
||||||
imul edx, 2; // multiply temp remainder value by 2
|
shl edx, 1; // multiply temp remainder value by 2
|
||||||
sub edx, ecx; // subtract the divisor value from the temp remainder
|
cmp edx, ecx; // compare the temp remainder to the divisor value
|
||||||
cmp edx, 0; // compare the result to 0
|
jl endDiv; // if the temp remainder is less than the divisor value then goto endDiv
|
||||||
jl endDiv; // if the result is less than 0 then goto endDiv
|
jg addOne; // if the temp remainder is greater than the divisor value then goto addOne
|
||||||
jg addOne; // if the result is greater than 0 then goto addOne
|
test al, 1; // check if the quotient value is even or odd
|
||||||
mov ecx, eax; // assign the quotient value
|
jz endDiv; // if the quotient value is even goto endDiv
|
||||||
and ecx, 1; // if true (1) then odd if false (0) then even
|
|
||||||
jz endDiv; // if the result is equal to zero goto endDiv
|
|
||||||
addOne:
|
addOne:
|
||||||
inc eax; // add 1 to the quotient value
|
inc eax; // add 1 to the quotient value
|
||||||
jmp endDiv; // goto endDiv
|
jmp endDiv; // goto endDiv
|
||||||
@@ -124,13 +117,13 @@ endDiv:
|
|||||||
jmp cJmp; // goto cJmp
|
jmp cJmp; // goto cJmp
|
||||||
bJmp:
|
bJmp:
|
||||||
mov edx, armorDR; // get the armorDR value
|
mov edx, armorDR; // get the armorDR value
|
||||||
cmp edx, 0; // compare the armorDR value to 0
|
test edx, edx; // compare the armorDR value to 0
|
||||||
jle dJmp; // if the armorDR value is less than or equal to 0 then goto dJmp
|
jle dJmp; // if the armorDR value is less than or equal to 0 then goto dJmp
|
||||||
cJmp:
|
cJmp:
|
||||||
cmp ebx, 0; // compare the new damage value to 0
|
test ebx, ebx; // compare the new damage value to 0
|
||||||
jle noDamageJmp; // goto noDamageJmp
|
jle noDamageJmp; // goto noDamageJmp
|
||||||
mov edx, armorDR; // get the armorDR value
|
mov edx, armorDR; // get the armorDR value
|
||||||
cmp edx, 0; // compare the armorDR value to 0
|
test edx, edx; // compare the armorDR value to 0
|
||||||
jle eJmp; // if the armorDR value is less than or equal to 0 then goto eJmp
|
jle eJmp; // if the armorDR value is less than or equal to 0 then goto eJmp
|
||||||
mov eax, difficulty; // get the CD value
|
mov eax, difficulty; // get the CD value
|
||||||
cmp eax, 100; // compare the CD value to 100
|
cmp eax, 100; // compare the CD value to 100
|
||||||
@@ -142,9 +135,9 @@ sdrJmp:
|
|||||||
sub edx, 20; // subtract 20 from the armorDR value
|
sub edx, 20; // subtract 20 from the armorDR value
|
||||||
aSubCJmp:
|
aSubCJmp:
|
||||||
mov eax, dword ptr ammoDRM; // get the ammoDRM value
|
mov eax, dword ptr ammoDRM; // get the ammoDRM value
|
||||||
cmp eax, 0; // compare the ammoDRM value to 0
|
test eax, eax; // compare the ammoDRM value to 0
|
||||||
jl adrJmp; // if the ammoDRM value is less than 0 then goto adrJmp
|
jl adrJmp; // if the ammoDRM value is less than 0 then goto adrJmp
|
||||||
je bSubCJmp; // if the ammoDRM value is equal to 0 then goto bSubCJmp
|
jz bSubCJmp; // if the ammoDRM value is equal to 0 then goto bSubCJmp
|
||||||
xor ecx, ecx; // clear value
|
xor ecx, ecx; // clear value
|
||||||
sub ecx, eax; // subtract ammoDRM value from 0
|
sub ecx, eax; // subtract ammoDRM value from 0
|
||||||
mov eax, ecx; // set new ammoDRM value
|
mov eax, ecx; // set new ammoDRM value
|
||||||
@@ -152,7 +145,7 @@ adrJmp:
|
|||||||
add edx, eax; // add the ammoDRM value to the armorDR value
|
add edx, eax; // add the ammoDRM value to the armorDR value
|
||||||
bSubCJmp:
|
bSubCJmp:
|
||||||
mov eax, dword ptr ammoX; // get the ammoX value
|
mov eax, dword ptr ammoX; // get the ammoX value
|
||||||
cmp eax, 0; // compare the ammoX value to 0
|
test eax, eax; // compare the ammoX value to 0
|
||||||
jg cSubCJmp; // if the ammoX value is greater than 0 then goto cSubCJmp;
|
jg cSubCJmp; // if the ammoX value is greater than 0 then goto cSubCJmp;
|
||||||
mov eax, 1; // set the ammoX value to 1
|
mov eax, 1; // set the ammoX value to 1
|
||||||
cSubCJmp:
|
cSubCJmp:
|
||||||
@@ -203,7 +196,7 @@ bSubDJmp:
|
|||||||
divSix:
|
divSix:
|
||||||
add ebx, eax; // add the quotient value to the ND value
|
add ebx, eax; // add the quotient value to the ND value
|
||||||
eJmp:
|
eJmp:
|
||||||
cmp ebx, 0; // compare the new damage value to 0
|
test ebx, ebx; // compare the new damage value to 0
|
||||||
jle noDamageJmp; // goto noDamageJmp
|
jle noDamageJmp; // goto noDamageJmp
|
||||||
mov eax, multiplyDamage; // get the Critical Multiplier (CM) value
|
mov eax, multiplyDamage; // get the Critical Multiplier (CM) value
|
||||||
cmp eax, 2; // compare the CM value to 2
|
cmp eax, 2; // compare the CM value to 2
|
||||||
|
|||||||
@@ -164,7 +164,9 @@
|
|||||||
<EntryPointSymbol>
|
<EntryPointSymbol>
|
||||||
</EntryPointSymbol>
|
</EntryPointSymbol>
|
||||||
<NoEntryPoint>false</NoEntryPoint>
|
<NoEntryPoint>false</NoEntryPoint>
|
||||||
|
<BaseAddress>0x11000000</BaseAddress>
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
|
<FixedBaseAddress>false</FixedBaseAddress>
|
||||||
<DataExecutionPrevention>
|
<DataExecutionPrevention>
|
||||||
</DataExecutionPrevention>
|
</DataExecutionPrevention>
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
@@ -215,7 +217,9 @@
|
|||||||
<EntryPointSymbol>
|
<EntryPointSymbol>
|
||||||
</EntryPointSymbol>
|
</EntryPointSymbol>
|
||||||
<NoEntryPoint>false</NoEntryPoint>
|
<NoEntryPoint>false</NoEntryPoint>
|
||||||
|
<BaseAddress>0x11000000</BaseAddress>
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
|
<FixedBaseAddress>false</FixedBaseAddress>
|
||||||
<DataExecutionPrevention>
|
<DataExecutionPrevention>
|
||||||
</DataExecutionPrevention>
|
</DataExecutionPrevention>
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
@@ -267,7 +271,9 @@
|
|||||||
<EntryPointSymbol>
|
<EntryPointSymbol>
|
||||||
</EntryPointSymbol>
|
</EntryPointSymbol>
|
||||||
<NoEntryPoint>false</NoEntryPoint>
|
<NoEntryPoint>false</NoEntryPoint>
|
||||||
|
<BaseAddress>0x11000000</BaseAddress>
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
|
<FixedBaseAddress>false</FixedBaseAddress>
|
||||||
<DataExecutionPrevention>
|
<DataExecutionPrevention>
|
||||||
</DataExecutionPrevention>
|
</DataExecutionPrevention>
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
|||||||
Reference in New Issue
Block a user