Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
dd63e62
noting much just safety
Paul-Sml Jan 11, 2024
715d80e
freeze curse
Paul-Sml Jan 11, 2024
62931ce
not working commit
Paul-Sml Jan 12, 2024
eb179c3
..
Paul-Sml Jan 12, 2024
c026166
looking nice so far
Paul-Sml Jan 12, 2024
1a4378b
few stuff
Paul-Sml Jan 14, 2024
908609a
Event starts to look cool, still bugged
Paul-Sml Jan 15, 2024
d6389c4
I think slimes are done, testing on the way
Paul-Sml Jan 21, 2024
19ea3a8
small name fixes but the fight is not working :X
Paul-Sml Jan 21, 2024
c665bd5
some stuff done, we're gettin there
Paul-Sml Jan 23, 2024
ebceb1b
few things changed, closer to being done
Paul-Sml Jan 23, 2024
459334a
images
Paul-Sml Jan 24, 2024
fedb3d9
Merge branch 'erasels:main' into main
Paul-Sml Jan 24, 2024
83ff998
small zone edits
Paul-Sml Jan 26, 2024
f0e79f2
Merge branch 'erasels:main' into main
Paul-Sml Jan 26, 2024
03a1e29
one empty line del
Paul-Sml Jan 26, 2024
44dfee8
author name (me :smile: )
Paul-Sml Jan 26, 2024
40306d8
Merge branch 'erasels:main' into main
Paul-Sml Feb 9, 2024
5f7fe17
almost done
Paul-Sml Feb 9, 2024
bd0ec06
tiny bit of work and release
Paul-Sml Feb 9, 2024
4a49df0
Think I'm done ?
Paul-Sml Feb 10, 2024
5448e15
added barricade to smol slime
Paul-Sml Feb 10, 2024
f132e15
Merge branch 'erasels:main' into main
Paul-Sml Feb 10, 2024
49df764
Update src/main/resources/anniv6Resources/localization/eng/Hailstorm/…
Paul-Sml Mar 15, 2024
a6269d4
Update src/main/resources/anniv6Resources/localization/eng/Hailstorm/…
Paul-Sml Mar 15, 2024
9c2f849
changes after review still need to do dream catcher
Paul-Sml Mar 30, 2024
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
142 changes: 142 additions & 0 deletions src/main/java/spireMapOverhaul/zones/hailstorm/HailstormZone.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
package spireMapOverhaul.zones.hailstorm;

import basemod.BaseMod;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.MathUtils;
import com.megacrit.cardcrawl.actions.AbstractGameAction;
import com.megacrit.cardcrawl.actions.GameActionManager;
import com.megacrit.cardcrawl.actions.common.DamageAction;
import com.megacrit.cardcrawl.actions.common.DamageAllEnemiesAction;
import com.megacrit.cardcrawl.actions.common.GainBlockAction;
import com.megacrit.cardcrawl.cards.DamageInfo;
import com.megacrit.cardcrawl.core.AbstractCreature;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import com.megacrit.cardcrawl.monsters.MonsterGroup;
import com.megacrit.cardcrawl.monsters.exordium.Looter;
import com.megacrit.cardcrawl.random.Random;
import com.megacrit.cardcrawl.rooms.AbstractRoom;
import com.megacrit.cardcrawl.ui.campfire.AbstractCampfireOption;
import com.megacrit.cardcrawl.ui.campfire.RestOption;
import spireMapOverhaul.BetterMapGenerator;
import spireMapOverhaul.SpireAnniversary6Mod;
import spireMapOverhaul.abstracts.AbstractZone;
import spireMapOverhaul.zoneInterfaces.*;
import spireMapOverhaul.zones.hailstorm.campfire.FlintOption;
import spireMapOverhaul.zones.hailstorm.events.AbandonedCamp;
import spireMapOverhaul.zones.hailstorm.monsters.FrostSlimeL;
import spireMapOverhaul.zones.hailstorm.monsters.FrostSlimeM;
import spireMapOverhaul.zones.hailstorm.vfx.HailEffect;
import spireMapOverhaul.zones.hailstorm.vfx.HailstormEffect;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import static spireMapOverhaul.SpireAnniversary6Mod.makeID;
import static spireMapOverhaul.util.Wiz.adp;

public class HailstormZone extends AbstractZone implements CombatModifyingZone, ModifiedEventRateZone, RenderableZone, EncounterModifyingZone, CampfireModifyingZone {
public static final String ID = "Hailstorm";
public static final String Frost_Slime_L = SpireAnniversary6Mod.makeID("Frost_Slime_L");
public static final String Frost_Slime_M = SpireAnniversary6Mod.makeID("Frost_Slime_M");
public static final String Exordium_Thugs_FrostSlime = SpireAnniversary6Mod.makeID("Exordium_Thugs_FrostSlime");

public static final int blockFromSnow = 4;
public static final int turnSwitchBetweenSnowBlockAndHailDamage = 4;

public void atTurnStart() {
if (GameActionManager.turn < turnSwitchBetweenSnowBlockAndHailDamage) {
AbstractDungeon.actionManager.addToBottom(new GainBlockAction(adp(), blockFromSnow));
for (AbstractMonster q : AbstractDungeon.getCurrRoom().monsters.monsters) {
AbstractDungeon.actionManager.addToBottom(new GainBlockAction(q, blockFromSnow));
}
}
}
public void atTurnEnd() {
if (GameActionManager.turn > turnSwitchBetweenSnowBlockAndHailDamage) {
AbstractDungeon.actionManager.addToBottom(new DamageAction(adp(), new DamageInfo((AbstractCreature) null, GameActionManager.turn, DamageInfo.DamageType.THORNS), AbstractGameAction.AttackEffect.BLUNT_LIGHT));
AbstractDungeon.actionManager.addToBottom(new DamageAllEnemiesAction((AbstractCreature) null, DamageInfo.createDamageMatrix(GameActionManager.turn, true), DamageInfo.DamageType.THORNS, AbstractGameAction.AttackEffect.BLUNT_LIGHT));
}
}

public String getCombatText() {
return CardCrawlGame.languagePack.getUIString(makeID("HailEffect")).TEXT[0];
//I'd like to update text during combat so the player doesn't have to remind himself every single turn
}

@Override
public String forceEvent() {
return ModifiedEventRateZone.returnIfUnseen(AbandonedCamp.ID);
}

public HailstormZone() {
super(ID, Icons.MONSTER, Icons.EVENT, Icons.REST);
this.width = 2;
this.maxWidth = 4;
this.height = 3;
this.maxHeight = 4;
}


@Override
public void update() {
if (GameActionManager.turn <= turnSwitchBetweenSnowBlockAndHailDamage)
for (int i = 0; i < 7; i++) {
AbstractDungeon.effectsQueue.add(new HailEffect());
}
else
for (int i = 0; i < 20; i++) {
AbstractDungeon.effectsQueue.add(new HailstormEffect());
}
}

@Override
public AbstractZone copy() {
return new HailstormZone();
}

@Override
public Color getColor() {
return Color.CYAN.cpy();
}

@Override
public boolean canSpawn() {
return this.isAct(1);
}

@Override
protected boolean canIncludeEarlyRows() {
return false;
}

@Override
public List<ZoneEncounter> getNormalEncounters() {
return Arrays.asList(
new ZoneEncounter(Frost_Slime_L, 1, () -> new MonsterGroup(
new AbstractMonster[]{
new FrostSlimeL(0.0f, 0.0f),
})),
new ZoneEncounter(Exordium_Thugs_FrostSlime, 1, () -> new MonsterGroup(
new AbstractMonster[]{
new Looter(200.0f, 0.0f),
new FrostSlimeM(-100.0f, 0.0f),
}))

);
}

public void postAddButtons(ArrayList<AbstractCampfireOption> buttons) {
for (AbstractCampfireOption c : buttons) {
if (c instanceof RestOption && c.usable) {
c.usable = false;
((RestOption) c).updateUsability(false);
break;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package spireMapOverhaul.zones.hailstorm.campfire;

import com.badlogic.gdx.graphics.Texture;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.helpers.ImageMaster;
import com.megacrit.cardcrawl.localization.UIStrings;
import com.megacrit.cardcrawl.relics.AbstractRelic;
import com.megacrit.cardcrawl.relics.DreamCatcher;
import com.megacrit.cardcrawl.rewards.RewardItem;
import com.megacrit.cardcrawl.ui.campfire.AbstractCampfireOption;
import com.megacrit.cardcrawl.vfx.campfire.CampfireSleepEffect;
import com.megacrit.cardcrawl.vfx.campfire.CampfireSleepScreenCoverEffect;
import com.megacrit.cardcrawl.vfx.campfire.CampfireTokeEffect;
import spireMapOverhaul.util.TexLoader;
import spireMapOverhaul.zones.hailstorm.HailstormZone;
import spireMapOverhaul.zones.hailstorm.patches.CardRewardScreenFlintDreamCatcherInteractionPatch;
import spireMapOverhaul.zones.hailstorm.relics.Flint;

import java.util.ArrayList;

import static spireMapOverhaul.SpireAnniversary6Mod.makeID;
import static spireMapOverhaul.SpireAnniversary6Mod.makeUIPath;
import static spireMapOverhaul.util.Wiz.adp;

public class FlintOption extends AbstractCampfireOption {
private static final UIStrings uiStrings;
public static final String[] TEXT;

private static final Texture IMG = TexLoader.getTexture(makeUIPath("Hailstorm/FlintOption.png"));

public FlintOption() {
this.label = TEXT[0];
this.description = TEXT[1];
this.img = IMG;
int healAmt = (int)((float)AbstractDungeon.player.maxHealth * 0.6F);
}

public void useOption() {
CardCrawlGame.sound.play("SLEEP_BLANKET");
//First time
AbstractDungeon.effectList.add(new CampfireSleepEffect());
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested how this works with DreamCatcher?


//Second time + handling Dream Catcher
if (AbstractDungeon.player.hasRelic(DreamCatcher.ID)) {
CardRewardScreenFlintDreamCatcherInteractionPatch.trigger = true;
}
AbstractDungeon.effectList.add(new CampfireSleepEffect());

//
for(int i = 0; i < 30; ++i) {
AbstractDungeon.topLevelEffects.add(new CampfireSleepScreenCoverEffect());
}

if (adp().hasRelic(Flint.ID))
adp().getRelic(Flint.ID).onTrigger();
}

static {
uiStrings = CardCrawlGame.languagePack.getUIString(makeID(FlintOption.class.getSimpleName()));
TEXT = uiStrings.TEXT;
}
}
30 changes: 30 additions & 0 deletions src/main/java/spireMapOverhaul/zones/hailstorm/cards/Freeze.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package spireMapOverhaul.zones.hailstorm.cards;

import com.megacrit.cardcrawl.actions.common.MakeTempCardInDiscardAction;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import spireMapOverhaul.SpireAnniversary6Mod;
import spireMapOverhaul.abstracts.AbstractSMOCard;
import spireMapOverhaul.zones.hailstorm.HailstormZone;

//Can be renamed Freezing if needed
public class Freeze extends AbstractSMOCard {
public static final String ID = SpireAnniversary6Mod.makeID("Freeze");
private static final int COST = -2;

public Freeze() {
super(ID, HailstormZone.ID, COST, CardType.CURSE, CardRarity.CURSE, CardTarget.NONE, CardColor.CURSE);
this.selfRetain = true;
cardsToPreview = new IceBurn();
}

public void use(AbstractPlayer p, AbstractMonster m) {
}

public void triggerOnEndOfTurnForPlayingCard() {
this.addToTop((new MakeTempCardInDiscardAction(new IceBurn(upgraded), 1)));
}
public void upp() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upgradeable curse?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a way to handle Ascension, taht i find more interesting than adding an extra line in the event to deal free damage to the player

cardsToPreview.upgrade();
}
}
48 changes: 48 additions & 0 deletions src/main/java/spireMapOverhaul/zones/hailstorm/cards/IceBurn.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package spireMapOverhaul.zones.hailstorm.cards;

import com.megacrit.cardcrawl.actions.AbstractGameAction;
import com.megacrit.cardcrawl.actions.common.ApplyPowerAction;
import com.megacrit.cardcrawl.actions.common.DamageAction;
import com.megacrit.cardcrawl.cards.CardQueueItem;
import com.megacrit.cardcrawl.cards.DamageInfo;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import com.megacrit.cardcrawl.powers.FrailPower;
import spireMapOverhaul.SpireAnniversary6Mod;
import spireMapOverhaul.abstracts.AbstractSMOCard;
import spireMapOverhaul.zones.hailstorm.HailstormZone;

public class IceBurn extends AbstractSMOCard {
public static final String ID = SpireAnniversary6Mod.makeID(IceBurn.class.getSimpleName());
private static final int COST = -2;

public IceBurn() {
super(ID, HailstormZone.ID, COST, CardType.STATUS, CardRarity.SPECIAL, CardTarget.NONE, CardColor.COLORLESS);
this.selfRetain = false;
this.magicNumber = 2;
this.baseMagicNumber = 2;
}

public IceBurn(boolean upgraded) {
this();
if (upgraded)
this.upgrade();
}

public void use(AbstractPlayer p, AbstractMonster m) {
if (this.dontTriggerOnUseCard) {
this.addToBot(new DamageAction(AbstractDungeon.player, new DamageInfo(AbstractDungeon.player, this.magicNumber, DamageInfo.DamageType.THORNS), AbstractGameAction.AttackEffect.FIRE));
}

}

public void triggerOnEndOfTurnForPlayingCard() {
this.dontTriggerOnUseCard = true;
AbstractDungeon.actionManager.cardQueue.add(new CardQueueItem(this, true));
}

public void upp() {
upgradeMagicNumber(2);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why si this status upgradeable?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Along with the curse being upgradable, it generates upgraded version of iceburn.

"Ascension Icon Ascension 15 - Unfavorable [events].

Many [events] have less positive outcomes and more severe consequences. For example: More HP loss. Less gold or card as rewards. Guaranteed [Curse]."

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, maybe make sure it's not upgradeable normally though. Otherwise some cards like Apotheosis will make people quite mad. Same as with the curse

}
}
Loading