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
|
||||
displayName := GetConfig("CombatControl", "DisplayName", 0);
|
||||
|
||||
if displayName then begin
|
||||
if (displayName) then begin
|
||||
variable nameTag := add_iface_tag;
|
||||
debug_msg("NPC control - added new box: " + nameTag);
|
||||
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_INVENTORYMOVE, InventoryMove_Handler);
|
||||
register_hook_proc(HOOK_INVENWIELD, InvenWield_Handler);
|
||||
end else begin
|
||||
exit;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -20,3 +20,20 @@ PartyOrderAttackRobot=::Piep::
|
||||
RaceText=Geschlecht
|
||||
StyleText=Stil
|
||||
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=Раса
|
||||
StyleText=Стиль
|
||||
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);
|
||||
} else {
|
||||
surface = new BYTE[height * width](); // black background
|
||||
surface = new BYTE[height * width](); // black background (for main menu)
|
||||
widthFrom = width; // replace with rectangle
|
||||
}
|
||||
|
||||
|
||||
+23
-30
@@ -47,22 +47,22 @@ void DamageMod::DamageGlovz(fo::ComputeAttackResult &ctd, DWORD &accumulatedDama
|
||||
mov edi, accumulatedDamage;
|
||||
begin:
|
||||
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
|
||||
call fo::funcoffs::item_w_damage_; // get the raw 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
|
||||
add eax, ebx; // add the RB value to the RD value
|
||||
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
|
||||
mov ebx, eax; // set the ND 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
|
||||
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
|
||||
mov eax, 1; // set the ammoY value to 1
|
||||
aJmp:
|
||||
@@ -72,16 +72,10 @@ aJmp:
|
||||
jg grThan; // the dividend is greater than the divisor then goto grThan
|
||||
jmp setOne; // if the two values are equal then goto setOne
|
||||
lrThan:
|
||||
mov ecx, edx; // store the dividend value temporarily
|
||||
imul edx, 2; // multiply dividend value by 2
|
||||
sub edx, eax; // subtract divisor value from the dividend value
|
||||
cmp edx, 0; // compare the result to 0
|
||||
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
|
||||
shl edx, 1; // multiply dividend value by 2
|
||||
cmp edx, eax; // compare the dividend value to the divisor value
|
||||
jle setZero; // if the dividend value is less than or equal to the divisor value then goto setZero
|
||||
jmp setOne; // if the dividend value is greater than the divisor value then goto setOne
|
||||
grThan:
|
||||
mov ecx, eax; // assign the divisor value
|
||||
xor eax, eax; // clear value
|
||||
@@ -90,15 +84,14 @@ bbbJmp:
|
||||
sub edx, ecx; // subtract the divisor value from the dividend 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
|
||||
test edx, edx; // compare the remainder value to 0
|
||||
jz endDiv; // if the remainder value is equal to 0 then goto endDiv
|
||||
imul edx, 2; // multiply temp remainder value by 2
|
||||
sub edx, ecx; // subtract the divisor value from the temp remainder
|
||||
cmp edx, 0; // compare the result to 0
|
||||
jl endDiv; // if the result is less than 0 then goto endDiv
|
||||
jg addOne; // if the result is greater than 0 then goto addOne
|
||||
mov ecx, eax; // assign the quotient value
|
||||
and ecx, 1; // if true (1) then odd if false (0) then even
|
||||
jz endDiv; // if the result is equal to zero goto endDiv
|
||||
shl edx, 1; // multiply temp remainder value by 2
|
||||
cmp edx, ecx; // compare the temp remainder to the divisor value
|
||||
jl endDiv; // if the temp remainder is less than the divisor value then goto endDiv
|
||||
jg addOne; // if the temp remainder is greater than the divisor value then goto addOne
|
||||
test al, 1; // check if the quotient value is even or odd
|
||||
jz endDiv; // if the quotient value is even goto endDiv
|
||||
addOne:
|
||||
inc eax; // add 1 to the quotient value
|
||||
jmp endDiv; // goto endDiv
|
||||
@@ -124,13 +117,13 @@ endDiv:
|
||||
jmp cJmp; // goto cJmp
|
||||
bJmp:
|
||||
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
|
||||
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
|
||||
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
|
||||
mov eax, difficulty; // get the CD value
|
||||
cmp eax, 100; // compare the CD value to 100
|
||||
@@ -142,9 +135,9 @@ sdrJmp:
|
||||
sub edx, 20; // subtract 20 from the armorDR value
|
||||
aSubCJmp:
|
||||
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
|
||||
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
|
||||
sub ecx, eax; // subtract ammoDRM value from 0
|
||||
mov eax, ecx; // set new ammoDRM value
|
||||
@@ -152,7 +145,7 @@ adrJmp:
|
||||
add edx, eax; // add the ammoDRM value to the armorDR value
|
||||
bSubCJmp:
|
||||
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;
|
||||
mov eax, 1; // set the ammoX value to 1
|
||||
cSubCJmp:
|
||||
@@ -203,7 +196,7 @@ bSubDJmp:
|
||||
divSix:
|
||||
add ebx, eax; // add the quotient value to the ND value
|
||||
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
|
||||
mov eax, multiplyDamage; // get the Critical Multiplier (CM) value
|
||||
cmp eax, 2; // compare the CM value to 2
|
||||
|
||||
@@ -164,7 +164,9 @@
|
||||
<EntryPointSymbol>
|
||||
</EntryPointSymbol>
|
||||
<NoEntryPoint>false</NoEntryPoint>
|
||||
<BaseAddress>0x11000000</BaseAddress>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<FixedBaseAddress>false</FixedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
@@ -215,7 +217,9 @@
|
||||
<EntryPointSymbol>
|
||||
</EntryPointSymbol>
|
||||
<NoEntryPoint>false</NoEntryPoint>
|
||||
<BaseAddress>0x11000000</BaseAddress>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<FixedBaseAddress>false</FixedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
@@ -267,7 +271,9 @@
|
||||
<EntryPointSymbol>
|
||||
</EntryPointSymbol>
|
||||
<NoEntryPoint>false</NoEntryPoint>
|
||||
<BaseAddress>0x11000000</BaseAddress>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<FixedBaseAddress>false</FixedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
|
||||
Reference in New Issue
Block a user