diff --git a/config.dat b/config.dat index a35a1cf..aaba845 100644 Binary files a/config.dat and b/config.dat differ diff --git a/script/KevinSystem/Universal_EnemyLib.dnh b/script/KevinSystem/Universal_EnemyLib.dnh index 540a228..1be82d0 100644 --- a/script/KevinSystem/Universal_EnemyLib.dnh +++ b/script/KevinSystem/Universal_EnemyLib.dnh @@ -12,9 +12,6 @@ #include "script/KevinSystem/kevin_system/Lib_Const.dnh" -let ITEMID_PTR = LoadAreaCommonDataValuePointer("ScriptID", "ItemID", 0); -let SYSTEMID_PTR = LoadAreaCommonDataValuePointer("ScriptID", "SystemID", 0); - // Code by Kevinmonitor with some assistance. /* @@ -839,8 +836,8 @@ task _EnemyItemDrop( { - if (isFlying) {SetCommonData("Flying Defeated", GetCommonData("Flying Defeated", 0)+1);} - else {SetCommonData("Ground Defeated", GetCommonData("Ground Defeated", 0)+1);} + if (isFlying) {SetCommonDataPtr(FLYINGENM_PTR, GetCommonDataPtr(FLYINGENM_PTR, 0)+1);} + else {SetCommonDataPtr(GROUNDENM_PTR, GetCommonDataPtr(GROUNDENM_PTR, 0)+1);} //_ExplosionEffect(enmX, enmY, PetalEffect); //_ScorePopup(float enmX, float enmY, int pointNum, int pivNum); diff --git a/script/KevinSystem/Universal_Lib.txt b/script/KevinSystem/Universal_Lib.txt index 3feed9c..49c7ae5 100644 --- a/script/KevinSystem/Universal_Lib.txt +++ b/script/KevinSystem/Universal_Lib.txt @@ -22,6 +22,12 @@ // Convenience constants +let ITEMID_PTR = LoadAreaCommonDataValuePointer("ScriptID", "ItemID", 0); +let SYSTEMID_PTR = LoadAreaCommonDataValuePointer("ScriptID", "SystemID", 0); + +let FLYINGENM_PTR = LoadCommonDataValuePointer("Flying Defeated", 0); +let GROUNDENM_PTR = LoadCommonDataValuePointer("Ground Defeated", 0); + const STG_WIDTH = GetStgFrameWidth(); const STG_HEIGHT = GetStgFrameHeight(); diff --git a/script/game/99Sec.dnh b/script/game/99Sec.dnh index f942824..6090a20 100644 --- a/script/game/99Sec.dnh +++ b/script/game/99Sec.dnh @@ -8,6 +8,8 @@ int rank = 1; // Increases through time +let RANK_PTR = LoadCommonDataValuePointer("Rank", 1); + let objScene = GetEnemyBossSceneObjectID(); let csd = GetCurrentScriptDirectory(); @@ -603,7 +605,7 @@ task EndBonus(int ID, int IDship){ ObjEnemy_SetLife(bossObj, -1); let timer = ObjEnemyBossScene_GetInfo(objScene, INFO_TIMERF); - WriteLog(timer); + //WriteLog(timer); // Bonus Calculations: @@ -639,8 +641,8 @@ task EndBonus(int ID, int IDship){ rankAvgFinal = rankSum/length(rankAvg); _CreateBonusText(STG_WIDTH/2, STG_HEIGHT/2-180, 30, 0x397FFF, "TIME REMAINING: " ~ vtos("5.2f", timer/60)); - _CreateBonusText(STG_WIDTH/2, STG_HEIGHT/2-140, 30, 0x00CC00, "GROUND ENEMIES DEFEATED: " ~ IntToString(GetCommonData("Ground Defeated", 0))); - _CreateBonusText(STG_WIDTH/2, STG_HEIGHT/2-100, 30, 0x8400CC, "FLYING ENEMIES DEFEATED: " ~ IntToString(GetCommonData("Flying Defeated", 0))); + _CreateBonusText(STG_WIDTH/2, STG_HEIGHT/2-140, 30, 0x00CC00, "GROUND ENEMIES DEFEATED: " ~ IntToString(GetCommonDataPtr(GROUNDENM_PTR, 0))); + _CreateBonusText(STG_WIDTH/2, STG_HEIGHT/2-100, 30, 0x8400CC, "FLYING ENEMIES DEFEATED: " ~ IntToString(GetCommonDataPtr(FLYINGENM_PTR, 0))); _CreateBonusText(STG_WIDTH/2, STG_HEIGHT/2-60, 30, 0x3400CC, "AVERAGE RANK: " ~ vtos("5.2f", rankAvgFinal)); _CreateBonusText(STG_WIDTH/2, STG_HEIGHT/2-20, 30, 0xCC00C8, "MULTIPLIER: " ~ vtos("5.2f", GetAreaCommonData("PIV", "currentvalue", 0)/10000)); @@ -648,7 +650,7 @@ task EndBonus(int ID, int IDship){ wait(120); - float multiplierBonus = timer/60 * 5 + GetCommonData("Ground Defeated", 0)/5 + GetCommonData("Flying Defeated", 0)/5 + rankAvgFinal * 5; + float multiplierBonus = timer/60 * 5 + GetCommonDataPtr(GROUNDENM_PTR, 0)/5 + GetCommonDataPtr(FLYINGENM_PTR, 0)/5 + rankAvgFinal * 5; int scoreBonus = trunc ( (multiplierBonus * GetAreaCommonData("PIV", "currentvalue", 0)) / 10 ) * 10; diff --git a/script/game/99Sec_EnmLib.dnh b/script/game/99Sec_EnmLib.dnh index b5bcf8c..2612ba2 100644 --- a/script/game/99Sec_EnmLib.dnh +++ b/script/game/99Sec_EnmLib.dnh @@ -190,7 +190,7 @@ task _SmallFairyFallingLine( _EnemyItemDrop( enm, true, 5, 3, - 10+(GetCommonData("Rank", 1)-1)*2, 6+(GetCommonData("Rank", 1)-1)*1, + 10+(GetCommonDataPtr(RANK_PTR, 1)-1)*2, 6+(GetCommonDataPtr(RANK_PTR, 1)-1)*1, 120, smallEnemyHitbox*2 ); @@ -252,7 +252,7 @@ task _SmallFairyAimedFan( _EnemyItemDrop( enm, true, 5, 3, - 10+(GetCommonData("Rank", 1)-1)*2, 6+(GetCommonData("Rank", 1)-1)*1, + 10+(GetCommonDataPtr(RANK_PTR, 1)-1)*2, 6+(GetCommonDataPtr(RANK_PTR, 1)-1)*1, 120, smallEnemyHitbox*2 ); @@ -321,7 +321,7 @@ task _SmallFairyRing( _EnemyItemDrop( enm, true, 5, 3, - 10+(GetCommonData("Rank", 1)-1)*2, 6+(GetCommonData("Rank", 1)-1)*1, + 10+(GetCommonDataPtr(RANK_PTR, 1)-1)*2, 6+(GetCommonDataPtr(RANK_PTR, 1)-1)*1, 120, smallEnemyHitbox*2 ); @@ -379,7 +379,7 @@ task _CreateFrog( _EnemyItemDrop( enm, false, 4, 8, - 7+round((GetCommonData("Rank", 1)-1)*1.25), 15+(GetCommonData("Rank", 1)-1)*2, + 7+round((GetCommonDataPtr(RANK_PTR, 1)-1)*1.25), 15+(GetCommonDataPtr(RANK_PTR, 1)-1)*2, 120, popcornHitbox*2 ); @@ -506,7 +506,7 @@ task _CreateKingFrog( _EnemyItemDrop( enm, false, 8, 14, - round(15+(GetCommonData("Rank", 1)-1)*1.25), round(20+(GetCommonData("Rank", 1)-1)*2), + round(15+(GetCommonDataPtr(RANK_PTR, 1)-1)*1.25), round(20+(GetCommonDataPtr(RANK_PTR, 1)-1)*2), 180, largeEnemyHitbox*2.5 ); @@ -758,7 +758,7 @@ task _CreateRybbShip( _EnemyItemDrop( enm, true, 6, 10, - round(9+(GetCommonData("Rank", 1)-1)*1.1), round(16+(GetCommonData("Rank", 1)-1)*1.4), + round(9+(GetCommonDataPtr(RANK_PTR, 1)-1)*1.1), round(16+(GetCommonDataPtr(RANK_PTR, 1)-1)*1.4), 180, largeEnemyHitbox*2.5 ); @@ -858,7 +858,7 @@ task _LargeFairyAimedFan( _EnemyItemDrop( enm, true, 15, 6, - round(20+(GetCommonData("Rank", 1)-1)*2.25), round(12+(GetCommonData("Rank", 1)-1)*2), + round(20+(GetCommonDataPtr(RANK_PTR, 1)-1)*2.25), round(12+(GetCommonDataPtr(RANK_PTR, 1)-1)*2), 180, largeEnemyHitbox*2 ); diff --git a/script/game/config.dat b/script/game/config.dat index 6226910..347d771 100644 Binary files a/script/game/config.dat and b/script/game/config.dat differ diff --git a/script/game/data.dat b/script/game/data.dat index f21615d..fbeb41b 100644 Binary files a/script/game/data.dat and b/script/game/data.dat differ diff --git a/script/game/replay/99Sec_replay01.dat b/script/game/replay/99Sec_replay01.dat new file mode 100644 index 0000000..6c677f8 Binary files /dev/null and b/script/game/replay/99Sec_replay01.dat differ diff --git a/script/replay/Gay_Package_replay03.dat b/script/replay/Gay_Package_replay03.dat index ce7d46a..639fc63 100644 Binary files a/script/replay/Gay_Package_replay03.dat and b/script/replay/Gay_Package_replay03.dat differ diff --git a/th_dnh_ph3sx.log b/th_dnh_ph3sx.log index e69de29..fa1aad1 100644 Binary files a/th_dnh_ph3sx.log and b/th_dnh_ph3sx.log differ