Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions EngineHacks/Necessary/StatGetters/Movement.event
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
ALIGN 4
pMovModifiers: // Movement
POIN prAddUnitBaseMov prAddUnitMovBonus (prGetItemMovBonus-1) prItemPassiveMov prRallyMov prSkillCelerity prSkillPoise prArmorMarchCheck prDelivererBonus prEquipmentBonusMov
POIN Encumbered
#ifdef STAIRS_ASM
POIN StairsMoveDebuff-1
#endif
Expand Down
1 change: 1 addition & 0 deletions EngineHacks/SkillSystem/Internals/SkillSystem.event
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ BYTE BracingStanceID DartingStanceID FierceStanceID KestrelStanceID MirrorStance
BYTE ExpertiseID
BYTE SlayerID NullifyID //effectiveness stuff
BYTE BlackMagicID
BYTE EncumberedID
BYTE FortressDefenseID FortressResistanceID ForesightID AxefaithID FullMetalBodyID LiquidOozeID DevilsLuckID DevilsPactID DevilsWhimID DevilsTrainingID PoisonStrikeID GrislyWoundID HexID BarricadeID BarricadePlusID PointBlankID PerfectionistID PuissanceID BattleVeteranID HolyAuraID SilentPrideID LoyaltyID ThunderstormID OutriderID HeavyStrikesID ChargeID InfiltratorID VanityID MageSlayerID KnightAspirantID DisciplinePlusID HeroID SealMagID DriveStrID DriveMagID DriveSpdID DriveDefID DriveResID QuickRiposteID ResolveID InsightID VigilanceID DauntID BloodTideID WhitePoolID NightTideID PrescienceID DefiantAvoID DefiantCritID DefiantStrID DefiantMagID DefiantSklID DefiantSpdID DefiantLckID DefiantDefID DefiantResID ShortShieldID TowerShieldID TowerShieldPlusID IndoorFighterID OutdoorFighterID TomeRangeUpID AlertStanceID AlertStancePlusID CoronaID FlareID TempestID SerenityID PetrifyID EnrageID DeadeyeID DragonFangID FortuneID //this hasnt been updated in like a year and a half lol
/*
//NOT WORKING (or they should not be affected by nihil)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@echo off

SET startDir="C:\devkitPro\devkitARM\bin\"
SET as="%startDir%arm-none-eabi-as"
SET LYN="C:\devkitPro\lyn.exe"

@rem Assemble into an elf
%as% -g -mcpu=arm7tdmi -mthumb-interwork %1 -o "%~n1.elf"

if exist "Definitions.s" (

@rem Assemble definitions into a .elf if exists
%as% -g -mcpu=arm7tdmi -mthumb-interwork "Definitions.s" -o "Definitions.elf"

@rem Assebmle into a .lyn.event with definitions
%LYN% "%~n1.elf" "Definitions.elf" > "%~n1.lyn.event"

echo y | del "%~dp0Definitions.elf"
) else (
@rem Assemble into a .lyn.event
%LYN% "%~n1.elf" > "%~n1.lyn.event"
)

echo y | del "%~n1.elf"

pause
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ALIGN 4
PUSH
ORG CURRENTOFFSET+$1;Encumbered:
POP
WORD $1C04B5F0 $1C281C0D $68094918
SHORT ((SkillTester-4-CURRENTOFFSET>>12)&$7FF)|$F000 ((SkillTester-4-CURRENTOFFSET>>1)&$7FF)|$F800
WORD $D0252800 $46864816 $5C68211B $42982300 $F800D01E $68381C07 $68797CC0 $18407C49 $1C067EB9 $490F1C28 $F800468E $42B00840 $E00DDD00 $6A806828 $6A896869 $21014308 $D1024208 $2301E7FF $2302E001 $1AE4E7FF $1C291C20 $BC04BCF0 $4710
POIN EncumberedID_Link
WORD $8019431 $80189B9
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
@Encumbered: If this unit is rescuing another unit who's CON is equal or higher than half this unit's AID,
@ unit gets -1 Mov. The penalty changes to -2 if this unit has Mounted AID calc
.thumb

.equ GetUnit,0x08019430+1
.equ GetUnitAid, 0x80189B8+1

.type Encumbered, %function
.global Encumbered
Encumbered:
push {r4-r7, lr}
mov r4, r0 @ stat value
mov r5, r1 @ unit

mov r0, r5
ldr r1, =EncumberedID_Link
ldr r1, [r1]
bl SkillTester
cmp r0, #0
beq End

@ Get the rescuee unit struct
ldr r0, =GetUnit
mov r14, r0
mov r1, #0x1B
ldrb r0, [r5, r1]
mov r3, #0
cmp r0, r3
beq End @if the unit isn't rescuing, branch to end
.short 0xF800
@ unit struct pointer in r0
mov r7, r0

@Now load the rescuee unit's CON
ldr r0, [r7, #0x0]
ldrb r0, [r0, #0x13] @unit CON
ldr r1, [r7, #0x04]
ldrb r1, [r1, #0x11] @class CON
add r0, r1
ldrb r1, [r7, #0x1A] @CON bonus
mov r6, r0 @r6 contains rescuee CON

@Now load the rescuer unit's AID
mov r0, r5
ldr r1, =GetUnitAid
mov r14, r1
.short 0xF800
lsr r0, #1 @r0 now has the rescuer's AID from the GetUnitAid function and we're dividing it by 2
cmp r0, r6 @compare the rescuer's AID/2 to the rescuee's CON
ble CheckForMount @if the halved AID is less than or equal to the CON, check for mount
b End

@ Check if the rescuer is mounted
CheckForMount:
ldr r0,[r5] @load the unit's character data
ldr r0,[r0,#0x28] @load the ability 1 bitfield
ldr r1,[r5,#0x4] @load the unit's class data
ldr r1,[r1,#0x28] @load the ability 1 bitfield
orr r0,r1 @perform an OR logical operation on the two bitfields
mov r1,#0x1 @add 1 to the a seperate register to compare it to the bitfield for mounted aid (which is 1)
tst r0,r1 @compare them
bne SubtractTwo @if equal, the rescuer is mounted, subtract 2 from their movement
b SubtractOne @else subtract 1

SubtractOne:
mov r3, #0x01
b ApplySkill

SubtractTwo:
mov r3, #0x02
b ApplySkill

@subtract bonus to movement value
ApplySkill:
sub r4, r3

End:
mov r0, r4 @ value
mov r1, r5 @ unit
pop {r4-r7}
pop {r2}
bx r2
.ltorg



Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ prResolve:
POIN SkillTester
WORD ResolveID

#include "Encumbered/Encumbered.lyn.event"
ALIGN 4
EncumberedID_Link:
WORD EncumberedID

#include "PushSkills/PushSkills.event"

#include "LullSkills/LullSkills.event"
8 changes: 7 additions & 1 deletion EngineHacks/SkillSystem/skill_definitions.event
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,11 @@
//By Jester
#define DevilsTrainingID 183

//Encumbered: If this unit is rescuing another unit who's CON is equal or higher than half this unit's AID,
//unit gets -1 Mov. The penalty changes to -2 if this unit has Mounted AID calc
//By Jester
#define EncumberedID 33

//Down With Arch: If the hit lands, instantly kill the enemy unit. (Only if name starts with "Arch")
#define DownWithArchID 255

Expand Down Expand Up @@ -773,7 +778,8 @@
#define DazzleID 141

//Desperation: If HP < 50%, double attacks occur immediately.
#define DesperationID 33 //DONE by ??? (Initial Commit)
//DONE by ??? (Initial Commit)
#define DesperationID 255

//Assassinate: When initiating battle at 1 range: +2 Damage, double attacks occur before counter.
//By Zeta
Expand Down
3 changes: 2 additions & 1 deletion EngineHacks/SkillSystem/skill_descriptions.event
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,9 @@ SkillDescription(DeityID,SD_Barricade)
SkillDescription(AversionID,SD_Focus)
// SkillDescription(AcrobatMinusID,SD_AcrobatMinus)
// SkillDescription(FlierID,SD_Flier)
// SkillDescription(EncumberedID, SD_Encumbered)
// SkillDescription(SwordKillerID, SD_SwordKiller)
// SkillDescription(LanceKillerID, SD_LanceKiller)
// SkillDescription(AxeKillerID, SD_AxeKiller)
// SkillDescription(BowKillerID, SD_BowKiller)
// SkillDescription(TomeKillerID, SD_TomeKiller)
// SkillDescription(TomeKillerID, SD_TomeKiller)
3 changes: 3 additions & 0 deletions EngineHacks/SkillSystem/skill_icons.event
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,9 @@ ORG SkillIcon(AcrobatMinusID)
ORG SkillIcon(FlierID)
#incbin "SkillIcons/Acrobat.dmp"

ORG SkillIcon(EncumberedID)
#incbin "SkillIcons/Acrobat.dmp"

ORG SkillIcon(SwordKillerID)
#incbin "SkillIcons/Acrobat.dmp"

Expand Down
7 changes: 6 additions & 1 deletion Text/skilldesc_text.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1508,6 +1508,11 @@ of the weapon triangle.[X]
CamaraderieAlt: Grants +10 hit if[N]
there are allies within 2 tiles.[X]

// ## SD_Encumbered
// Encumbered: If rescuing and rescuee[N]
// CON > rescuer AID/2, rescuer MOV -1.[N]
// If rescuer mounted, then MOV -2.[X]

// ## SD_SwordKiller
// Sword Killer:[N]
// Deal x2 effective damage[N]
Expand All @@ -1531,4 +1536,4 @@ there are allies within 2 tiles.[X]
// ## SD_TomeKiller
// Tome Killer:[N]
// Deal x2 effective damage[N]
// against magic users.[X]
// against magic users.[X]