mirror of https://github.com/zeldaret/botw.git
Implement aoc2::rankUpEnemy
It's a pretty large function and I wanted to see how difficult it would be to match it. Not very hard :D
This commit is contained in:
parent
b93b9d3c45
commit
1cc0b1e6be
|
@ -18,6 +18,9 @@ add_executable(uking
|
||||||
src/Game/AI/Action/actionSetLinkTagBasic.cpp
|
src/Game/AI/Action/actionSetLinkTagBasic.cpp
|
||||||
src/Game/AI/Action/actionSetLinkTagBasic.h
|
src/Game/AI/Action/actionSetLinkTagBasic.h
|
||||||
|
|
||||||
|
src/Game/DLC/aoc2.cpp
|
||||||
|
src/Game/DLC/aoc2.h
|
||||||
|
|
||||||
src/KingSystem/ActorSystem/actActor.h
|
src/KingSystem/ActorSystem/actActor.h
|
||||||
src/KingSystem/ActorSystem/actActorCreator.cpp
|
src/KingSystem/ActorSystem/actActorCreator.cpp
|
||||||
src/KingSystem/ActorSystem/actActorCreator.h
|
src/KingSystem/ActorSystem/actActorCreator.h
|
||||||
|
|
|
@ -72755,7 +72755,7 @@
|
||||||
0x0000007100d6ef10,aoc2::setIsLastPlayHardModeToFalse,76,
|
0x0000007100d6ef10,aoc2::setIsLastPlayHardModeToFalse,76,
|
||||||
0x0000007100d6ef5c,aoc2::isTestOfStrengthDungeon,396,
|
0x0000007100d6ef5c,aoc2::isTestOfStrengthDungeon,396,
|
||||||
0x0000007100d6f0e8,aoc2::calc,20,
|
0x0000007100d6f0e8,aoc2::calc,20,
|
||||||
0x0000007100d6f0fc,aoc2::rankUpEnemy,7780,
|
0x0000007100d6f0fc,aoc2::rankUpEnemy,7780,_ZN5uking4aoc211rankUpEnemyERKN4sead14SafeStringBaseIcEERKN4ksys3map6ObjectEPPKc
|
||||||
0x0000007100d70f60,sub_7100D70F60,48,
|
0x0000007100d70f60,sub_7100D70F60,48,
|
||||||
0x0000007100d70f90,sub_7100D70F90,92,
|
0x0000007100d70f90,sub_7100D70F90,92,
|
||||||
0x0000007100d70fec,sub_7100D70FEC,48,
|
0x0000007100d70fec,sub_7100D70FEC,48,
|
||||||
|
|
Can't render this file because it is too large.
|
2
lib/sead
2
lib/sead
|
@ -1 +1 @@
|
||||||
Subproject commit 26b88aa2275b7c39d8b0898f0c77567b37ad6c11
|
Subproject commit ad85ebd3bf275f35c8ed16383ab66ff736ea7d6f
|
|
@ -0,0 +1,145 @@
|
||||||
|
#include "Game/DLC/aoc2.h"
|
||||||
|
|
||||||
|
namespace uking {
|
||||||
|
|
||||||
|
using namespace ksys;
|
||||||
|
|
||||||
|
bool aoc2::rankUpEnemy(const sead::SafeString& actor_name, const ksys::map::Object& obj,
|
||||||
|
const char** new_name) {
|
||||||
|
if (obj.getFlags().isOn(ksys::map::Object::Flag::HasUniqueName) ||
|
||||||
|
obj.getHardModeFlags().isOn(ksys::map::Object::HardModeFlag::DisableRankup)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!actor_name.startsWith("Enemy"))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (isTestOfStrengthShrine())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
sead::SafeString next = "";
|
||||||
|
|
||||||
|
/// @bug Yes, this is duplicated and shouldn't exist.
|
||||||
|
if (!actor_name.startsWith("Enemy"))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (actor_name == "Enemy_Assassin_Junior")
|
||||||
|
next = "Enemy_Assassin_Middle";
|
||||||
|
else if (actor_name == "Enemy_Assassin_Middle")
|
||||||
|
next = "Enemy_Assassin_Senior";
|
||||||
|
else if (actor_name == "Enemy_Assassin_Shooter_Junior")
|
||||||
|
next = "Enemy_Assassin_Shooter_Azito_Junior";
|
||||||
|
|
||||||
|
else if (actor_name == "Enemy_Bokoblin_Junior")
|
||||||
|
next = "Enemy_Bokoblin_Middle";
|
||||||
|
else if (actor_name == "Enemy_Bokoblin_Middle")
|
||||||
|
next = "Enemy_Bokoblin_Senior";
|
||||||
|
else if (actor_name == "Enemy_Bokoblin_Senior")
|
||||||
|
next = "Enemy_Bokoblin_Dark";
|
||||||
|
else if (actor_name == "Enemy_Bokoblin_Dark")
|
||||||
|
next = "Enemy_Bokoblin_Gold";
|
||||||
|
|
||||||
|
else if (actor_name == "Enemy_Bokoblin_Guard_Junior")
|
||||||
|
next = "Enemy_Bokoblin_Guard_Middle";
|
||||||
|
|
||||||
|
else if (actor_name == "Enemy_Bokoblin_Guard_Junior_Ambush")
|
||||||
|
next = "Enemy_Bokoblin_Guard_Middle_Ambush";
|
||||||
|
|
||||||
|
else if (actor_name == "Enemy_Bokoblin_Guard_Junior_TreeHouseTop")
|
||||||
|
next = "Enemy_Bokoblin_Guard_Middle_TreeHouseTop";
|
||||||
|
|
||||||
|
/// @bug Yes, this is duplicated and shouldn't exist.
|
||||||
|
else if (actor_name == "Enemy_Bokoblin_Guard_Junior_Ambush")
|
||||||
|
next = "Enemy_Bokoblin_Guard_Middle_Ambush";
|
||||||
|
|
||||||
|
else if (actor_name == "Enemy_Chuchu_Electric_Junior")
|
||||||
|
next = "Enemy_Chuchu_Electric_Middle";
|
||||||
|
else if (actor_name == "Enemy_Chuchu_Electric_Middle")
|
||||||
|
next = "Enemy_Chuchu_Electric_Senior";
|
||||||
|
|
||||||
|
else if (actor_name == "Enemy_Chuchu_Fire_Junior")
|
||||||
|
next = "Enemy_Chuchu_Fire_Middle";
|
||||||
|
else if (actor_name == "Enemy_Chuchu_Fire_Middle")
|
||||||
|
next = "Enemy_Chuchu_Fire_Senior";
|
||||||
|
|
||||||
|
else if (actor_name == "Enemy_Chuchu_Ice_Junior")
|
||||||
|
next = "Enemy_Chuchu_Ice_Middle";
|
||||||
|
else if (actor_name == "Enemy_Chuchu_Ice_Middle")
|
||||||
|
next = "Enemy_Chuchu_Ice_Senior";
|
||||||
|
|
||||||
|
else if (actor_name == "Enemy_Chuchu_Junior")
|
||||||
|
next = "Enemy_Chuchu_Middle";
|
||||||
|
else if (actor_name == "Enemy_Chuchu_Middle")
|
||||||
|
next = "Enemy_Chuchu_Senior";
|
||||||
|
|
||||||
|
else if (actor_name == "Enemy_Giant_Junior")
|
||||||
|
next = "Enemy_Giant_Middle";
|
||||||
|
else if (actor_name == "Enemy_Giant_Middle")
|
||||||
|
next = "Enemy_Giant_Senior";
|
||||||
|
|
||||||
|
else if (actor_name == "Enemy_Golem_Junior")
|
||||||
|
next = "Enemy_Golem_Middle";
|
||||||
|
else if (actor_name == "Enemy_Golem_Middle")
|
||||||
|
next = "Enemy_Golem_Senior";
|
||||||
|
|
||||||
|
else if (actor_name == "Enemy_Guardian_Mini_Baby")
|
||||||
|
next = "Enemy_Guardian_Mini_Junior";
|
||||||
|
else if (actor_name == "Enemy_Guardian_Mini_Junior")
|
||||||
|
next = "Enemy_Guardian_Mini_Middle";
|
||||||
|
else if (actor_name == "Enemy_Guardian_Mini_Middle")
|
||||||
|
next = "Enemy_Guardian_Mini_Senior";
|
||||||
|
|
||||||
|
else if (actor_name == "Enemy_Guardian_Mini_Junior_DetachLineBeam")
|
||||||
|
next = "Enemy_Guardian_Mini_Middle_DetachLineBeam";
|
||||||
|
|
||||||
|
else if (actor_name == "Enemy_Lizalfos_Junior")
|
||||||
|
next = "Enemy_Lizalfos_Middle";
|
||||||
|
else if (actor_name == "Enemy_Lizalfos_Middle")
|
||||||
|
next = "Enemy_Lizalfos_Senior";
|
||||||
|
else if (actor_name == "Enemy_Lizalfos_Senior")
|
||||||
|
next = "Enemy_Lizalfos_Dark";
|
||||||
|
else if (actor_name == "Enemy_Lizalfos_Dark")
|
||||||
|
next = "Enemy_Lizalfos_Gold";
|
||||||
|
|
||||||
|
else if (actor_name == "Enemy_Lizalfos_Guard_Junior")
|
||||||
|
next = "Enemy_Lizalfos_Guard_Middle";
|
||||||
|
|
||||||
|
else if (actor_name == "Enemy_Lizalfos_Guard_Junior_LongVisibility")
|
||||||
|
next = "Enemy_Lizalfos_Guard_Middle_LongVisibility";
|
||||||
|
|
||||||
|
else if (actor_name == "Enemy_Lizalfos_Junior_Guard_Ambush")
|
||||||
|
next = "Enemy_Lizalfos_Middle_Guard_Ambush";
|
||||||
|
|
||||||
|
else if (actor_name == "Enemy_Lynel_Junior")
|
||||||
|
next = "Enemy_Lynel_Middle";
|
||||||
|
else if (actor_name == "Enemy_Lynel_Middle")
|
||||||
|
next = "Enemy_Lynel_Senior";
|
||||||
|
else if (actor_name == "Enemy_Lynel_Senior")
|
||||||
|
next = "Enemy_Lynel_Dark";
|
||||||
|
else if (actor_name == "Enemy_Lynel_Dark")
|
||||||
|
next = "Enemy_Lynel_Gold";
|
||||||
|
|
||||||
|
else if (actor_name == "Enemy_Moriblin_Junior")
|
||||||
|
next = "Enemy_Moriblin_Middle";
|
||||||
|
else if (actor_name == "Enemy_Moriblin_Middle")
|
||||||
|
next = "Enemy_Moriblin_Senior";
|
||||||
|
else if (actor_name == "Enemy_Moriblin_Senior")
|
||||||
|
next = "Enemy_Moriblin_Dark";
|
||||||
|
else if (actor_name == "Enemy_Moriblin_Dark")
|
||||||
|
next = "Enemy_Moriblin_Gold";
|
||||||
|
|
||||||
|
else if (actor_name == "Enemy_Wizzrobe_Electric")
|
||||||
|
next = "Enemy_Wizzrobe_Electric_Senior";
|
||||||
|
else if (actor_name == "Enemy_Wizzrobe_Fire")
|
||||||
|
next = "Enemy_Wizzrobe_Fire_Senior";
|
||||||
|
else if (actor_name == "Enemy_Wizzrobe_Ice")
|
||||||
|
next = "Enemy_Wizzrobe_Ice_Senior";
|
||||||
|
|
||||||
|
if (next.isEmpty())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
*new_name = next.cstr();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace uking
|
|
@ -0,0 +1,25 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <heap/seadDisposer.h>
|
||||||
|
#include <prim/seadSafeString.h>
|
||||||
|
#include "KingSystem/Map/mapObject.h"
|
||||||
|
|
||||||
|
namespace uking {
|
||||||
|
|
||||||
|
// FIXME: incomplete
|
||||||
|
class aoc2 {
|
||||||
|
SEAD_SINGLETON_DISPOSER(aoc2)
|
||||||
|
|
||||||
|
aoc2();
|
||||||
|
virtual ~aoc2();
|
||||||
|
|
||||||
|
public:
|
||||||
|
void init(sead::Heap* heap);
|
||||||
|
|
||||||
|
bool isTestOfStrengthShrine() const;
|
||||||
|
|
||||||
|
bool rankUpEnemy(const sead::SafeString& actor_name, const ksys::map::Object& obj,
|
||||||
|
const char** new_name);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace uking
|
Loading…
Reference in New Issue