Implement achievements properly

This commit is contained in:
Melledy
2025-11-29 00:29:04 -08:00
parent 898e8dd43f
commit f53bdaba32
44 changed files with 818 additions and 115 deletions
@@ -3,6 +3,7 @@ package emu.nebula.game.gacha;
import emu.nebula.data.GameData;
import emu.nebula.game.GameContext;
import emu.nebula.game.GameContextModule;
import emu.nebula.game.achievement.AchievementCondition;
import emu.nebula.game.inventory.ItemAcquireMap;
import emu.nebula.game.inventory.ItemParamMap;
import emu.nebula.game.inventory.ItemType;
@@ -164,6 +165,9 @@ public class GachaModule extends GameContextModule {
var log = new GachaHistoryLog(data.getGachaType(), results);
player.getGachaManager().addGachaHistory(log);
// Trigger achievements
player.triggerAchievement(AchievementCondition.GachaTotal, amount);
// Complete
return new GachaResult(info, change, results);
}