From cf2c54d115bad6448e86b0d4e780ebafdfc60252 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 16 Oct 2015 02:26:03 -0400 Subject: [PATCH] v0.3.2: some implementation on the ritual site quest --- assets/elemental.png | Bin 3274 -> 4281 bytes .../actors/mobs/NewbornElemental.java | 60 +++++++++++ .../items/quest/CeremonialCandle.java | 101 ++++++++++++++++++ 3 files changed, 161 insertions(+) create mode 100644 src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewbornElemental.java create mode 100644 src/com/shatteredpixel/shatteredpixeldungeon/items/quest/CeremonialCandle.java diff --git a/assets/elemental.png b/assets/elemental.png index 5e7564dedf3a10a164b516a893abccf8e779f06e..c93b4d7edf30a047e8357e57c0540c568aacf709 100644 GIT binary patch delta 4255 zcmV;Q5Mb}h8Mz^l7Y-l@1^@s6{i&wp000U(kvbcHNXMO)cT`l@7KhKhcY2}CFalDB z-n+m6(tDF$MPZm3U?>9)Gc>Uwq5=^`M4BQavC@~mCR4i{s z){CyJy!Z0*`{S%{?X&l}`|Q2XS{DG4r!SY621@~u$`kN|Je=tfkx_K)0Du7=V1OwA zOjbsJx?iw+2oTB3&4r#Jaspoj0q}ZQyaI63&@+He2mha>S?PR%=$HTzo3l9?ED;xo zI3-JvF1F8#m>QQXW*8-Az9>Nv%ZWK*kqtikEV84R*{M9Xh{ZXlvs2k(?iKO2Od&_a zh_8qXGr62B5#JKAMv5?%E8;ie*i;TP0{|3%No*HzScxJw5iyA$667M{MTtq^NHl*T1?CO*}7&0ztZsv2j*bmJyf3G7=Z`5B*PvzoDiKdLpOAxi2 z$L0#SX*@cY_n(^h55xYX#km%V()ba7P-BdM)O9LAe(eV+3K1aD`^8=Vqi??WFd%+; z;VP4hbN}x*{b#|Y;w6Kd@Hx&UD1^=u@-r9r#Lp6-0Rcz?Dv$@tKpp4+LtqB1fGuzY zZonJ(gAfo2Rs$AD1gU@zvOpf#1PVbh*a`N4YETCnK{IFt$3Z7J1u$9dISw z03U@r;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el/shatteredpixeldungeon/actors/mobs/NewbornElemental.java new file mode 100644 index 000000000..fcd22a8ef --- /dev/null +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewbornElemental.java @@ -0,0 +1,60 @@ +/* + * Pixel Dungeon + * Copyright (C) 2012-2015 Oleg Dolya + * + * Shattered Pixel Dungeon + * Copyright (C) 2014-2015 Evan Debenham + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + */ +package com.shatteredpixel.shatteredpixeldungeon.actors.mobs; + +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Chill; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Frost; + +public class NewbornElemental extends Elemental { + + { + name = "newborn fire elemental"; + HT = 65; + HP = HT/2; //32 + + defenseSkill = 12; + + EXP = 4; + + loot = null; //TODO Elemental embers + lootChance = 1f; + } + + @Override + public int damageRoll() { + return super.damageRoll()/2; + } + + @Override + public void add(Buff buff) { + if (buff instanceof Frost || buff instanceof Chill) { + die(buff); + } else { + super.add(buff); + } + } + + @Override + public String description() { + return "young fire elemental"; //TODO + } +} diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/quest/CeremonialCandle.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/quest/CeremonialCandle.java new file mode 100644 index 000000000..94a14d333 --- /dev/null +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/quest/CeremonialCandle.java @@ -0,0 +1,101 @@ +/* + * Pixel Dungeon + * Copyright (C) 2012-2015 Oleg Dolya + * + * Shattered Pixel Dungeon + * Copyright (C) 2014-2015 Evan Debenham + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + */ +package com.shatteredpixel.shatteredpixeldungeon.items.quest; + +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.NewbornElemental; +import com.shatteredpixel.shatteredpixeldungeon.items.Heap; +import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.levels.Level; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; + + +public class CeremonialCandle extends Item { + + //generated with the wandmaker quest + public static int ritualPos; + + { + name = "ceremonial candle"; + image = ItemSpriteSheet.CANDLE; + + unique = true; + } + + @Override + public boolean isUpgradable() { + return false; + } + + @Override + public boolean isIdentified() { + return true; + } + + @Override + public void doDrop(Hero hero) { + super.doDrop(hero); + checkCandles(); + } + + @Override + protected void onThrow(int cell) { + super.onThrow(cell); + checkCandles(); + } + + private static void checkCandles(){ + Heap heapTop = Dungeon.level.heaps.get(ritualPos - Level.WIDTH); + Heap heapRight = Dungeon.level.heaps.get(ritualPos + 1); + Heap heapBottom = Dungeon.level.heaps.get(ritualPos + Level.WIDTH); + Heap heapLeft = Dungeon.level.heaps.get(ritualPos - 1); + + if (heapTop != null && + heapRight != null && + heapBottom != null && + heapLeft != null){ + + if (heapTop.peek() instanceof CeremonialCandle && + heapRight.peek() instanceof CeremonialCandle && + heapBottom.peek() instanceof CeremonialCandle && + heapLeft.peek() instanceof CeremonialCandle){ + + heapTop.pickUp(); + heapRight.pickUp(); + heapBottom.pickUp(); + heapLeft.pickUp(); + + NewbornElemental elemental = new NewbornElemental(); + elemental.pos = ritualPos; + Dungeon.level.mobs.add( elemental ); + + } + } + + } + + @Override + public String info() { + return + "candle"; //TODO + } +}