|
|
| Line 17: |
Line 17: |
|
| |
|
| 60 + (difficulty level *3) - [Cautious Mode bonus (10)] | | 60 + (difficulty level *3) - [Cautious Mode bonus (10)] |
|
| |
| ==Comparison of Damage routines==
| |
| [[File:xcraft-dam-routine.GIF]]
| |
|
| |
|
| |
| To explain, first the memory address of the Xcraft weapon is loaded to eax. Then the damage value is read from (eax+6) and loaded into bx. This value is sent to the random function where the value generated is returned through eax. Thereafter, the base value (ebx) is added to the random value (eax) for a range of 100-200%. The value of eax has edx subtracted from it (after extensive testing of several encounters and having edx displayed for each attack, edx always seems to be 0). eax is bit-shifted 1 space to the right {divided by two} and the final amount added to the amount of damage the craft has sustained (edi+0Ah). The result is that Xcraft weapons do 50-100% damage.
| |
|
| |
| [[File:UFO-dam-routine.GIF]]
| |
|
| |
| In the UFO case: the memory location for the UFO stats are set in ecx. Then the UFO weapon power is read (ecx+16h) and put into dx. Then this value is sent to the random funtion and again returned through eax (or ax as is the case here). ecx is set to zero and the random value is checked to see if zero was generated [cmp(compare) ax, cx]. If this is true, the program jumps past the section to assign damage to the Xcraft.
| |
|
| |
|
| |
|
| |
|
| |
| *The main routine for interdiction in DOS1.4 version is from 330B0~336A8.
| |
|
| |
|
| ==Feedback== | | ==Feedback== |
| Any questions or feedback one may have.... | | Any questions or feedback one may have.... |
Revision as of 10:41, 26 April 2012
Functions used in UFOloader's new interception routines
For those that might want to know how accuracy is calculated with the new options for interception turned on:
X-Craft Accuracy
[(1+((3-(.5*(difficulty level-1)))/UFOsize)/2 ] * Weapon Accuracy ....... [beginner=1..superhuman=5]
Diff Ship Size
VS S M L VL
begin 0.8 0.875 1 1.25 2
exp 0.75 0.8125 0.91667 1.125 1.75
vet 0.7 0.75 0.83333 1 1.5
Genius 0.65 0.6875 0.75 0.875 1.25
Super 0.6 0.625 0.66667 0.75 1
UFO Accuracy
60 + (difficulty level *3) - [Cautious Mode bonus (10)]
Feedback
Any questions or feedback one may have....