Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from FireEmblemUniverse/develop
End of Phase 1
- Loading branch information
Showing
76 changed files
with
6,899 additions
and
935 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,3 +60,4 @@ $RECYCLE.BIN/ | |
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
*.csv# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
.thumb | ||
.global CheckItem | ||
.type CheckItem, %function | ||
|
||
.equ DoesUnitHaveItem, 0x080179F8 @Params: r0=char data ptr, r1=item id to search for | ||
|
||
.macro blh to, reg | ||
ldr \reg, =\to | ||
mov lr, \reg | ||
.short 0xF800 | ||
.endm | ||
|
||
CheckItem: | ||
push { lr } | ||
ldr r0, =#0x03004E50 | ||
ldr r0, [ r0 ] @ Get current unit's character struct | ||
ldr r1, =#0x030004BC | ||
ldr r1, [ r1 ] @ Get item specified | ||
blh DoesUnitHaveItem, r2 | ||
|
||
ldr r1, =#0x030004E8 @ Offset of slot 0xC | ||
cmp r0, #0x00 | ||
beq False | ||
mov r2, #0x01 | ||
b End | ||
|
||
False: | ||
mov r2, #0x00 | ||
|
||
End: | ||
str r2, [ r1 ] | ||
pop { r0 } | ||
bx r0 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
.thumb | ||
.equ AxeFaithID, SkillTester+4 | ||
|
||
push {r4-r7, lr} | ||
|
||
@Check if unit has skill | ||
ldr r0, SkillTester | ||
mov lr, r0 | ||
mov r0, r4 | ||
ldr r1, AxeFaithID | ||
.short 0xf800 | ||
cmp r0, #0 | ||
beq NoSkill | ||
|
||
@Unit has skill, check to see if unit has an axe equipped | ||
mov r0, #0x50 @Move to the attacking unit weapon type. | ||
ldrb r0, [r4, r0] @Load the attacking unit weapon type. | ||
cmp r0, #2 @Is it Axe? | ||
bne NoSkill @If not, goto end | ||
|
||
@Add to Hit | ||
mov r0, #0x19 | ||
ldrh r0, [r4,r0] @load luck | ||
lsr r1, r0, #1 @put half luck in r1 | ||
add r0, r0, r1 @add back together. | ||
mov r3, #0x60 | ||
ldrh r1, [r4,r3] @load hit | ||
add r1, r0 @Increase hit by 1.5x Luck. | ||
strh r1, [r4,r3] @store. | ||
|
||
NoSkill: | ||
pop {r4-r7} | ||
pop {r0} | ||
bx r0 | ||
|
||
.align | ||
SkillTester: | ||
@POIN SkillTester | ||
@WORD AxeFaithID | ||
|
||
|
||
@@Axe Faith | ||
@@for axe faith Ive settled on axes dont break and hit += luck * 1.5 | ||
|
||
@@other things said on the matter | ||
@@+10 Hit if post-enemy evasion hit is above 40 but below 70. | ||
|
||
@@but if you follow the Axe Faith | ||
@@anything over 49 is actually 100 | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
108 changes: 108 additions & 0 deletions
108
Engine Hacks/Skill System/Other Skills/armsthriftaxefaith.s
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
.thumb | ||
|
||
WTYPE_AXE = 0x02 | ||
GetItemAfterUse = 0x08016AEC+1 | ||
RollBattleRN = 0x0802A52C+1 | ||
GetEquippedWeapon = 0x08016B28+1 | ||
GetWeaponType = 0x08017548+1 | ||
_ReturnLocation = 0x0802B828+1 | ||
|
||
LUnitHasSkill = EALiterals+0x00 | ||
LArmsthriftSkillID = EALiterals+0x04 | ||
LAxeFaithSkillID = EALiterals+0x08 | ||
|
||
@ Hook from 0802B7F8 | ||
ArmsthriftHook: | ||
@ r0 is Current Round Data (first word) | ||
@ r5 is Attacker | ||
@ Nothing needs to be saved (we branch back to the function epilogue) | ||
|
||
mov r1, #2 @ Miss flag | ||
|
||
tst r0, r1 @ <void> = CurrentRound & 2 | ||
beq NonMiss @ goto NonMiss if zero (Miss flag is not set) | ||
|
||
ldr r1, [r5, #0x4C] @ BattleUnit.weaponAttributes | ||
mov r2, #(0x02 | 0x80) @ IA_MAGIC | IA_UNCOUNTERABLE | ||
|
||
tst r1, r2 @ <void> = BattleUnit.weaponAttributes & (IA_MAGIC | IA_UNCOUNTERABLE) | ||
beq End @ goto End if zero (weapon is neither magic or uncounterable) | ||
|
||
NonMiss: | ||
@ ACTUAL ARMSTHRIFT CHECK BEGIN | ||
|
||
mov r0, r5 @ arg r0 = (Battle) Unit | ||
ldr r1, LArmsthriftSkillID @ arg r1 = Skill Index | ||
|
||
ldr r3, LUnitHasSkill | ||
bl BXR3 | ||
|
||
cmp r0, #0 @ compare result | ||
beq NonArmsthrift @ goto NonArmsthrift if zero (unit does not have armsthrift) | ||
|
||
@ Getting Armsthrift proc chance (=luck) | ||
ldrb r0, [r5, #0x19] @ BattleUnit.luck | ||
@ lsl r0, #1 @ multiply by 2 | ||
|
||
@ ROLL | ||
ldr r3, =RollBattleRN | ||
bl BXR3 | ||
|
||
cmp r0, #0 @ compare result | ||
bne End @ goto End if non-zero (Armsthrift proc) | ||
|
||
NonArmsthrift: | ||
@ ACTUAL ARMSTHRIFT CHECK END | ||
|
||
@2wb: begin AxeFaith check | ||
mov r0, r5 @ arg r0 = (Battle) Unit | ||
ldr r1, LAxeFaithSkillID @ arg r1 = Skill Index | ||
|
||
ldr r3, LUnitHasSkill | ||
bl BXR3 | ||
|
||
cmp r0, #0 @ compare result | ||
beq NonAxeFaith @ goto NonAxeFaith if zero (unit does not have axefaith) | ||
|
||
@ Unit has axefaith | ||
@ Are they using an axe? | ||
mov r0, r5 @arg r0 = unit | ||
ldr r3, =GetEquippedWeapon | ||
bl BXR3 | ||
|
||
ldr r3, =GetWeaponType | ||
bl BXR3 | ||
|
||
cmp r0, #WTYPE_AXE @ #0x02 | ||
beq End @ goto End if true (AxeFaith triggers) | ||
|
||
NonAxeFaith: | ||
mov r4, #0x48 @ offsetof(BattleUnit.weaponAfter) | ||
|
||
ldrh r0, [r5, r4] @ Load weapon | ||
|
||
ldr r3, =GetItemAfterUse | ||
bl BXR3 | ||
|
||
strh r0, [r5, r4] @ Store used weapon | ||
|
||
cmp r0, #0 @ Compare weapon | ||
bne End @ goto End if weapon != 0 | ||
|
||
mov r1, #0x7D @ BattleUnit.weaponBroke | ||
mov r0, #1 | ||
|
||
strb r0, [r5, r1] @ BattleUnit.weaponBroke = true | ||
|
||
End: | ||
ldr r3, =_ReturnLocation | ||
BXR3: | ||
bx r3 | ||
|
||
.ltorg | ||
.align | ||
|
||
EALiterals: | ||
@ POIN SkillTester|1 | ||
@ WORD ArmsthriftID | ||
@ WORD AxeFaithID |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.