Skip to content

Commit

Permalink
add level-up when beating the ancient remains boss fight
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheaterpaul committed Nov 8, 2023
1 parent 49a45af commit b3ef984
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import de.teamlapen.vampirism.blocks.mother.MotherTreeStructure;
import de.teamlapen.vampirism.core.*;
import de.teamlapen.vampirism.entity.GhostEntity;
import de.teamlapen.vampirism.entity.factions.FactionPlayerHandler;
import de.teamlapen.vampirism.network.ClientboundBossEventSoundPacket;
import de.teamlapen.vampirism.network.ClientboundPlayEventPacket;
import de.teamlapen.vampirism.particle.FlyingBloodParticleOptions;
Expand Down Expand Up @@ -324,6 +325,9 @@ public void concludeFight() {
if (livingentity instanceof ServerPlayer serverplayer) {
ModAdvancements.TRIGGER_MOTHER_WIN.trigger(serverplayer);
serverplayer.awardStat(ModStats.mother_defeated, 1);
FactionPlayerHandler.getOpt(serverplayer).filter(s -> s.getCurrentFaction() != null && s.getCurrentLevel() < s.getCurrentFaction().getHighestReachableLevel()).ifPresent(handler -> {
handler.setFactionLevel(handler.getCurrentFaction(), handler.getCurrentLevel() + 1);
});
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/teamlapen/vampirism/core/ModBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class ModBlocks {
public static final RegistryObject<GarlicDiffuserBlock> GARLIC_DIFFUSER_WEAK = registerWithItem("garlic_diffuser_weak", () -> new GarlicDiffuserBlock(GarlicDiffuserBlock.Type.WEAK));
public static final RegistryObject<HunterTableBlock> HUNTER_TABLE = registerWithItem("hunter_table", HunterTableBlock::new);
public static final RegistryObject<MedChairBlock> MED_CHAIR = registerWithItem("med_chair", MedChairBlock::new);
public static final RegistryObject<SunscreenBeaconBlock> SUNSCREEN_BEACON = registerWithItem("sunscreen_beacon", SunscreenBeaconBlock::new);
public static final RegistryObject<SunscreenBeaconBlock> SUNSCREEN_BEACON = registerWithItem("sunscreen_beacon", SunscreenBeaconBlock::new, new Item.Properties().rarity(Rarity.RARE));
public static final RegistryObject<TentBlock> TENT = BLOCKS.register("tent", TentBlock::new);
public static final RegistryObject<TentMainBlock> TENT_MAIN = BLOCKS.register("tent_main", TentMainBlock::new);
public static final RegistryObject<TotemBaseBlock> TOTEM_BASE = registerWithItem("totem_base", TotemBaseBlock::new);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/vampirism/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
"advancement.vampirism.jump_scare": "Jump Scare",
"advancement.vampirism.jump_scare.desc": "Find out how it is to be scared to death",
"advancement.vampirism.hunter_kill_mother": "Hunter of the Shadows",
"advancement.vampirism.hunter_kill_mother.desc": "You've proven your mettle as a true hunter by conquering the 'Ancient Remains.' and dealing a blow to vampiric power.",
"advancement.vampirism.hunter_kill_mother.desc": "You've proven your mettle as a true hunter by conquering the 'Ancient Remains' and dealing a blow to vampiric power.",
"advancement.vampirism.vampire_kill_mother": "Ancient Dominion",
"advancement.vampirism.vampire_kill_mother.desc": "You've have vanquishing the local source of power, a questionable accomplishment.",
"__comment": "effect",
Expand Down

0 comments on commit b3ef984

Please sign in to comment.