forked from Arino09/Jaina_StSMod
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
260 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
*.class | ||
|
||
# IntelliJ | ||
.idea/ | ||
out/ | ||
*.iml | ||
|
||
# Eclipse | ||
.classpath | ||
.project | ||
.settings/ | ||
.vscode/ | ||
|
||
# maven build target | ||
target/ | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.ear | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
|
||
# ========================= | ||
# Operating System Files | ||
# ========================= | ||
|
||
# OSX | ||
# ========================= | ||
|
||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
# Windows | ||
# ========================= | ||
|
||
# Windows image file caches | ||
Thumbs.db | ||
ehthumbs.db | ||
|
||
# Folder config file | ||
Desktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Windows Installer files | ||
*.cab | ||
*.msi | ||
*.msm | ||
*.msp | ||
|
||
# Windows shortcuts | ||
*.lnk | ||
|
||
# Spriter files | ||
*.autosave.scml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package jaina.actions; | ||
|
||
import com.megacrit.cardcrawl.actions.AbstractGameAction; | ||
import com.megacrit.cardcrawl.actions.animations.VFXAction; | ||
import com.megacrit.cardcrawl.actions.common.ApplyPowerAction; | ||
import com.megacrit.cardcrawl.actions.common.GainBlockAction; | ||
import com.megacrit.cardcrawl.core.AbstractCreature; | ||
import com.megacrit.cardcrawl.vfx.FireBurstParticleEffect; | ||
import jaina.powers.SorchedPower; | ||
import jaina.powers.unique.FlameWardPower; | ||
import jaina.powers.unique.WildfirePower; | ||
|
||
public class ApplySorchedAction extends AbstractGameAction { | ||
|
||
public ApplySorchedAction(AbstractCreature source, AbstractCreature target, int amount) { | ||
this.source = source; | ||
this.target = target; | ||
this.amount = amount; | ||
this.actionType = ActionType.DEBUFF; | ||
} | ||
|
||
@Override | ||
public void update() { | ||
if (source.isPlayer && !target.isDying && !target.halfDead && !target.isDead) { | ||
// 野火给予额外层数 | ||
// if (source.hasPower(WildfirePower.POWER_ID)) { | ||
// int extra = source.getPower(WildfirePower.POWER_ID).amount; | ||
// amount += extra; | ||
// } | ||
// 给予燃烧 | ||
addToBot(new VFXAction(new FireBurstParticleEffect(target.hb_x, target.hb_y))); | ||
addToBot(new ApplyPowerAction(target, source, new SorchedPower(target, amount))); | ||
// 判断是否获得格挡 | ||
// if (source.hasPower(FlameWardPower.POWER_ID)) { | ||
// int block = source.getPower(FlameWardPower.POWER_ID).amount; | ||
// addToBot(new GainBlockAction(source, Math.abs(block * amount))); | ||
// } | ||
} | ||
this.isDone = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
package jaina.powers; | ||
|
||
import com.megacrit.cardcrawl.actions.AbstractGameAction; | ||
import com.megacrit.cardcrawl.actions.animations.VFXAction; | ||
import com.megacrit.cardcrawl.actions.common.ApplyPowerAction; | ||
import com.megacrit.cardcrawl.actions.common.DamageAction; | ||
import com.megacrit.cardcrawl.actions.common.RemoveSpecificPowerAction; | ||
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.localization.PowerStrings; | ||
import com.megacrit.cardcrawl.powers.StrengthPower; | ||
import com.megacrit.cardcrawl.rooms.AbstractRoom; | ||
import com.megacrit.cardcrawl.vfx.FireBurstParticleEffect; | ||
import jaina.modCore.IHelper; | ||
import jaina.powers.unique.ExplosiveRunesPower; | ||
|
||
public class SorchedPower extends AbstractJainaPower { | ||
public static final String POWER_ID = IHelper.makeID("SorchedPower"); | ||
private static final PowerStrings powerStrings = CardCrawlGame.languagePack.getPowerStrings(POWER_ID); | ||
private static final String NAME = powerStrings.NAME; | ||
private static final String[] DESCRIPTIONS = powerStrings.DESCRIPTIONS; | ||
|
||
public SorchedPower(AbstractCreature owner, int amount) { | ||
super(POWER_ID, false, NAME, PowerType.DEBUFF); | ||
this.owner = owner; | ||
this.amount = amount; | ||
updateDescription(); | ||
} | ||
|
||
@Override | ||
public void reducePower(int reduceAmount) { | ||
super.reducePower(reduceAmount); | ||
if (amount <= 0) { | ||
addToBot(new RemoveSpecificPowerAction(this.owner, this.owner, this)); | ||
} | ||
} | ||
|
||
|
||
@Override | ||
public void onInitialApplication() { | ||
addToBot(new VFXAction(new FireBurstParticleEffect(owner.hb.x, owner.hb.y))); | ||
} | ||
|
||
// 可以由外部触发 | ||
@Override | ||
public void onSpecificTrigger() { | ||
if (!owner.isDying && !owner.isDeadOrEscaped()) { | ||
flash(); | ||
addToBot(new DamageAction(owner, new DamageInfo(owner, amount, DamageInfo.DamageType.HP_LOSS), | ||
AbstractGameAction.AttackEffect.FIRE)); | ||
} | ||
} | ||
|
||
// 回合结束时自动触发 | ||
@Override | ||
public void atEndOfTurn(boolean isPlayer) { | ||
this.flash(); | ||
this.addToBot(new ApplyPowerAction(this.owner, this.owner, new SorchedPower(this.owner, -this.amount), -this.amount)); | ||
this.addToBot(new RemoveSpecificPowerAction(this.owner, this.owner, this)); | ||
} | ||
|
||
@Override | ||
public void atStartOfTurn() { | ||
// if (AbstractDungeon.getCurrRoom().phase == AbstractRoom.RoomPhase.COMBAT && !AbstractDungeon.getMonsters().areMonstersBasicallyDead()) { | ||
// onSpecificTrigger(); | ||
// addToBot(new RemoveSpecificPowerAction(this.owner, this.owner, this)); | ||
// } | ||
} | ||
|
||
@Override | ||
public void updateDescription() { | ||
this.description = String.format(DESCRIPTIONS[0], amount, amount); | ||
} | ||
|
||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters