├── .classpath ├── .gitignore ├── .project ├── AndroidManifest.xml ├── LICENSE ├── LICENSE.txt ├── README.md ├── assets ├── amulet.png ├── arcs1.png ├── arcs2.png ├── avatars.png ├── badges.png ├── banners.png ├── banners_wm_.pspimage ├── bat.png ├── blacksmith.png ├── brute.png ├── buffs.png ├── burning_fist.png ├── chrome.png ├── crab.png ├── dashboard.png ├── demon.png ├── dm300.png ├── effects.png ├── elemental.png ├── exp_bar.png ├── eye.png ├── fireball.png ├── font15x.png ├── font1x.png ├── font25x.png ├── font2x.png ├── font3x.png ├── game.mp3 ├── ghost.png ├── gnoll.png ├── golem.png ├── goo.png ├── hp_bar.png ├── icons.png ├── icons_orig.png ├── icons_original.png ├── items.png ├── king.png ├── large_buffs.png ├── larva.png ├── mage.png ├── monk.png ├── pet.png ├── piranha.png ├── plants.png ├── pspbrwse.jbf ├── ranger.png ├── rat.png ├── ratking.png ├── rogue.png ├── rotting_fist.png ├── scorpio.png ├── shaman.png ├── sheep.png ├── shopkeeper.png ├── skeleton.png ├── snd_alert.mp3 ├── snd_badge.mp3 ├── snd_beacon.mp3 ├── snd_blast.mp3 ├── snd_bones.mp3 ├── snd_boss.mp3 ├── snd_burning.mp3 ├── snd_challenge.mp3 ├── snd_charms.mp3 ├── snd_click.mp3 ├── snd_cursed.mp3 ├── snd_death.mp3 ├── snd_descend.mp3 ├── snd_dewdrop.mp3 ├── snd_door_open.mp3 ├── snd_drink.mp3 ├── snd_eat.mp3 ├── snd_evoke.mp3 ├── snd_falling.mp3 ├── snd_ghost.mp3 ├── snd_gold.mp3 ├── snd_hit.mp3 ├── snd_item.mp3 ├── snd_levelup.mp3 ├── snd_lightning.mp3 ├── snd_lullaby.mp3 ├── snd_mastery.mp3 ├── snd_meld.mp3 ├── snd_miss.mp3 ├── snd_plant.mp3 ├── snd_puff.mp3 ├── snd_ray.mp3 ├── snd_read.mp3 ├── snd_rocks.mp3 ├── snd_secret.mp3 ├── snd_shatter.mp3 ├── snd_step.mp3 ├── snd_teleport.mp3 ├── snd_tomb.mp3 ├── snd_trap.mp3 ├── snd_unlock.mp3 ├── snd_water.mp3 ├── snd_zap.mp3 ├── specks.png ├── spell_icons.png ├── spinner.png ├── statue.png ├── status_pane.png ├── succubus.png ├── surface.mp3 ├── surface.png ├── swarm.png ├── tengu.png ├── theme.mp3 ├── thief.png ├── tiles0.png ├── tiles1.png ├── tiles2.png ├── tiles3.png ├── tiles4.png ├── toolbar.png ├── undead.png ├── wandmaker.png ├── warlock.png ├── warrior.png ├── water0.png ├── water1.png ├── water2.png ├── water3.png ├── water4.png ├── wraith.png └── yog.png ├── project.properties ├── res ├── drawable-hdpi │ ├── ic_launcher.png │ └── pspbrwse.jbf ├── drawable-mdpi │ ├── ic_launcher.png │ └── pspbrwse.jbf ├── drawable-xhdpi │ ├── ic_launcher.png │ └── pspbrwse.jbf ├── drawable-xxhdpi │ ├── ic_launcher.png │ └── pspbrwse.jbf ├── drawable-xxxhdpi │ ├── ic_launcher.png │ └── pspbrwse.jbf ├── values-v11 │ └── styles.xml ├── values-v14 │ └── styles.xml └── values │ ├── strings.xml │ └── styles.xml └── src └── com └── shatteredpixel └── shatteredpixeldungeon ├── Assets.java ├── Badges.java ├── Bones.java ├── Challenges.java ├── Chrome.java ├── Dungeon.java ├── DungeonTilemap.java ├── FogOfWar.java ├── GamesInProgress.java ├── Journal.java ├── Preferences.java ├── QuickSlot.java ├── Rankings.java ├── ResultDescriptions.java ├── ShatteredPixelDungeon.java ├── Statistics.java ├── actors ├── Actor.java ├── Char.java ├── blobs │ ├── Alchemy.java │ ├── Blob.java │ ├── ConfusionGas.java │ ├── Fire.java │ ├── Foliage.java │ ├── Freezing.java │ ├── GooWarn.java │ ├── ParalyticGas.java │ ├── Regrowth.java │ ├── StenchGas.java │ ├── ToxicGas.java │ ├── WaterOfAwareness.java │ ├── WaterOfHealth.java │ ├── WaterOfTransmutation.java │ ├── Web.java │ └── WellWater.java ├── buffs │ ├── Amok.java │ ├── Awareness.java │ ├── Barkskin.java │ ├── Bleeding.java │ ├── Blindness.java │ ├── Buff.java │ ├── Burning.java │ ├── Charm.java │ ├── Combo.java │ ├── Cripple.java │ ├── Drowsy.java │ ├── EarthImbue.java │ ├── FireImbue.java │ ├── FlavourBuff.java │ ├── Frost.java │ ├── Fury.java │ ├── GasesImmunity.java │ ├── Hunger.java │ ├── Invisibility.java │ ├── Levitation.java │ ├── Light.java │ ├── MagicalSleep.java │ ├── MindVision.java │ ├── Ooze.java │ ├── Paralysis.java │ ├── Poison.java │ ├── Regeneration.java │ ├── Roots.java │ ├── Shadows.java │ ├── Sleep.java │ ├── Slow.java │ ├── SnipersMark.java │ ├── Speed.java │ ├── Terror.java │ ├── ToxicImbue.java │ ├── Vertigo.java │ └── Weakness.java ├── hero │ ├── Belongings.java │ ├── Hero.java │ ├── HeroAction.java │ ├── HeroClass.java │ └── HeroSubClass.java └── mobs │ ├── Acidic.java │ ├── Albino.java │ ├── Bandit.java │ ├── Bat.java │ ├── Bestiary.java │ ├── Brute.java │ ├── Crab.java │ ├── DM300.java │ ├── Elemental.java │ ├── Eye.java │ ├── Gnoll.java │ ├── Golem.java │ ├── Goo.java │ ├── King.java │ ├── Mob.java │ ├── Monk.java │ ├── Piranha.java │ ├── Rat.java │ ├── Scorpio.java │ ├── Senior.java │ ├── Shaman.java │ ├── Shielded.java │ ├── Skeleton.java │ ├── Spinner.java │ ├── Statue.java │ ├── Succubus.java │ ├── Swarm.java │ ├── Tengu.java │ ├── Thief.java │ ├── Warlock.java │ ├── Wraith.java │ ├── Yog.java │ └── npcs │ ├── Blacksmith.java │ ├── Ghost.java │ ├── Imp.java │ ├── ImpShopkeeper.java │ ├── MirrorImage.java │ ├── NPC.java │ ├── RatKing.java │ ├── Shopkeeper.java │ └── Wandmaker.java ├── effects ├── BadgeBanner.java ├── BannerSprites.java ├── BlobEmitter.java ├── CellEmitter.java ├── CheckedCell.java ├── DeathRay.java ├── Effects.java ├── EmoIcon.java ├── Fireball.java ├── Flare.java ├── FloatingText.java ├── Halo.java ├── IceBlock.java ├── Identification.java ├── Lightning.java ├── MagicMissile.java ├── Pushing.java ├── Ripple.java ├── Speck.java ├── SpellSprite.java ├── Splash.java ├── TorchHalo.java ├── Wound.java └── particles │ ├── BloodParticle.java │ ├── EarthParticle.java │ ├── ElmoParticle.java │ ├── EnergyParticle.java │ ├── FlameParticle.java │ ├── FlowParticle.java │ ├── GooWarnParticle.java │ ├── LeafParticle.java │ ├── PoisonParticle.java │ ├── PurpleParticle.java │ ├── ShadowParticle.java │ ├── ShaftParticle.java │ ├── SnowParticle.java │ ├── SparkParticle.java │ ├── WebParticle.java │ ├── WindParticle.java │ └── WoolParticle.java ├── items ├── Amulet.java ├── Ankh.java ├── ArmorKit.java ├── DewVial.java ├── Dewdrop.java ├── EquipableItem.java ├── Generator.java ├── Gold.java ├── Heap.java ├── Item.java ├── ItemStatusHandler.java ├── KindOfWeapon.java ├── KindofMisc.java ├── LloydsBeacon.java ├── Stylus.java ├── TomeOfMastery.java ├── Torch.java ├── Weightstone.java ├── armor │ ├── Armor.java │ ├── ClassArmor.java │ ├── ClothArmor.java │ ├── HuntressArmor.java │ ├── LeatherArmor.java │ ├── MageArmor.java │ ├── MailArmor.java │ ├── PlateArmor.java │ ├── RogueArmor.java │ ├── ScaleArmor.java │ ├── WarriorArmor.java │ └── glyphs │ │ ├── Affection.java │ │ ├── AntiEntropy.java │ │ ├── Bounce.java │ │ ├── Displacement.java │ │ ├── Entanglement.java │ │ ├── Metabolism.java │ │ ├── Multiplicity.java │ │ ├── Potential.java │ │ ├── Stench.java │ │ └── Viscosity.java ├── artifacts │ ├── AlchemistsToolkit.java │ ├── Artifact.java │ ├── CapeOfThorns.java │ ├── ChaliceOfBlood.java │ ├── CloakOfShadows.java │ ├── DriedRose.java │ ├── HornOfPlenty.java │ ├── MasterThievesArmband.java │ ├── SandalsOfNature.java │ ├── TalismanOfForesight.java │ ├── TimekeepersHourglass.java │ └── UnstableSpellbook.java ├── bags │ ├── Bag.java │ ├── ScrollHolder.java │ ├── SeedPouch.java │ └── WandHolster.java ├── food │ ├── Blandfruit.java │ ├── ChargrilledMeat.java │ ├── Food.java │ ├── FrozenCarpaccio.java │ ├── MysteryMeat.java │ ├── OverpricedRation.java │ └── Pasty.java ├── keys │ ├── GoldenKey.java │ ├── IronKey.java │ ├── Key.java │ └── SkeletonKey.java ├── potions │ ├── Potion.java │ ├── PotionOfExperience.java │ ├── PotionOfFrost.java │ ├── PotionOfHealing.java │ ├── PotionOfInvisibility.java │ ├── PotionOfLevitation.java │ ├── PotionOfLiquidFlame.java │ ├── PotionOfMight.java │ ├── PotionOfMindVision.java │ ├── PotionOfParalyticGas.java │ ├── PotionOfPurity.java │ ├── PotionOfStrength.java │ └── PotionOfToxicGas.java ├── quest │ ├── CorpseDust.java │ ├── DarkGold.java │ ├── DwarfToken.java │ ├── Pickaxe.java │ └── RatSkull.java ├── rings │ ├── Ring.java │ ├── RingOfAccuracy.java │ ├── RingOfElements.java │ ├── RingOfEvasion.java │ ├── RingOfForce.java │ ├── RingOfFuror.java │ ├── RingOfHaste.java │ ├── RingOfMagic.java │ ├── RingOfMight.java │ ├── RingOfSharpshooting.java │ ├── RingOfTenacity.java │ └── RingOfWealth.java ├── scrolls │ ├── InventoryScroll.java │ ├── Scroll.java │ ├── ScrollOfIdentify.java │ ├── ScrollOfLullaby.java │ ├── ScrollOfMagicMapping.java │ ├── ScrollOfMirrorImage.java │ ├── ScrollOfPsionicBlast.java │ ├── ScrollOfRage.java │ ├── ScrollOfRecharging.java │ ├── ScrollOfRemoveCurse.java │ ├── ScrollOfTeleportation.java │ ├── ScrollOfTerror.java │ ├── ScrollOfUpgrade.java │ └── ScrollOfWeaponUpgrade.java ├── wands │ ├── Wand.java │ ├── WandOfAmok.java │ ├── WandOfAvalanche.java │ ├── WandOfBlink.java │ ├── WandOfDisintegration.java │ ├── WandOfFirebolt.java │ ├── WandOfFlock.java │ ├── WandOfLightning.java │ ├── WandOfMagicMissile.java │ ├── WandOfPoison.java │ ├── WandOfRegrowth.java │ ├── WandOfSlowness.java │ ├── WandOfTelekinesis.java │ └── WandOfTeleportation.java └── weapon │ ├── Weapon.java │ ├── enchantments │ ├── Death.java │ ├── Fire.java │ ├── Horror.java │ ├── Instability.java │ ├── Leech.java │ ├── Luck.java │ ├── Paralysis.java │ ├── Piercing.java │ ├── Poison.java │ ├── Slow.java │ └── Swing.java │ ├── melee │ ├── BattleAxe.java │ ├── Dagger.java │ ├── Glaive.java │ ├── Knuckles.java │ ├── Longsword.java │ ├── Mace.java │ ├── MeleeWeapon.java │ ├── Quarterstaff.java │ ├── ShortSword.java │ ├── Spear.java │ ├── Sword.java │ └── WarHammer.java │ └── missiles │ ├── Boomerang.java │ ├── CurareDart.java │ ├── Dart.java │ ├── IncendiaryDart.java │ ├── Javelin.java │ ├── MissileWeapon.java │ ├── Shuriken.java │ └── Tamahawk.java ├── levels ├── CavesBossLevel.java ├── CavesLevel.java ├── CityBossLevel.java ├── CityLevel.java ├── DeadEndLevel.java ├── HallsBossLevel.java ├── HallsLevel.java ├── LastLevel.java ├── LastShopLevel.java ├── Level.java ├── Patch.java ├── PrisonBossLevel.java ├── PrisonLevel.java ├── RegularLevel.java ├── Room.java ├── SewerBossLevel.java ├── SewerLevel.java ├── Terrain.java ├── features │ ├── AlchemyPot.java │ ├── Chasm.java │ ├── Door.java │ └── HighGrass.java ├── painters │ ├── ArmoryPainter.java │ ├── BlacksmithPainter.java │ ├── BossExitPainter.java │ ├── CryptPainter.java │ ├── EntrancePainter.java │ ├── ExitPainter.java │ ├── GardenPainter.java │ ├── LaboratoryPainter.java │ ├── LibraryPainter.java │ ├── MagicWellPainter.java │ ├── Painter.java │ ├── PassagePainter.java │ ├── PitPainter.java │ ├── PoolPainter.java │ ├── RatKingPainter.java │ ├── ShopPainter.java │ ├── StandardPainter.java │ ├── StatuePainter.java │ ├── StoragePainter.java │ ├── TrapsPainter.java │ ├── TreasuryPainter.java │ ├── TunnelPainter.java │ ├── VaultPainter.java │ └── WeakFloorPainter.java └── traps │ ├── AlarmTrap.java │ ├── FireTrap.java │ ├── GrippingTrap.java │ ├── LightningTrap.java │ ├── ParalyticTrap.java │ ├── PoisonTrap.java │ ├── SummoningTrap.java │ └── ToxicTrap.java ├── mechanics ├── Ballistica.java └── ShadowCaster.java ├── plants ├── BlandfruitBush.java ├── Blindweed.java ├── Dreamfoil.java ├── Earthroot.java ├── Fadeleaf.java ├── Firebloom.java ├── Icecap.java ├── Plant.java ├── Sorrowmoss.java ├── Stormvine.java └── Sungrass.java ├── scenes ├── AboutScene.java ├── AmuletScene.java ├── BadgesScene.java ├── CellSelector.java ├── GameScene.java ├── InterlevelScene.java ├── IntroScene.java ├── LoadSaveScene.java ├── PixelScene.java ├── RankingsScene.java ├── StartScene.java ├── SurfaceScene.java ├── TitleScene.java └── WelcomeScene.java ├── sprites ├── AcidicSprite.java ├── AlbinoSprite.java ├── BanditSprite.java ├── BatSprite.java ├── BlacksmithSprite.java ├── BruteSprite.java ├── BurningFistSprite.java ├── CharSprite.java ├── CrabSprite.java ├── DM300Sprite.java ├── DiscardedItemSprite.java ├── ElementalSprite.java ├── EyeSprite.java ├── FetidRatSprite.java ├── GhostSprite.java ├── GnollSprite.java ├── GnollTricksterSprite.java ├── GolemSprite.java ├── GooSprite.java ├── GreatCrabSprite.java ├── HeroSprite.java ├── ImpSprite.java ├── ItemSprite.java ├── ItemSpriteSheet.java ├── KingSprite.java ├── LarvaSprite.java ├── MirrorSprite.java ├── MissileSprite.java ├── MobSprite.java ├── MonkSprite.java ├── PiranhaSprite.java ├── PlantSprite.java ├── RatKingSprite.java ├── RatSprite.java ├── RottingFistSprite.java ├── ScorpioSprite.java ├── SeniorSprite.java ├── ShamanSprite.java ├── SheepSprite.java ├── ShieldedSprite.java ├── ShopkeeperSprite.java ├── SkeletonSprite.java ├── SpinnerSprite.java ├── StatueSprite.java ├── SuccubusSprite.java ├── SwarmSprite.java ├── TenguSprite.java ├── ThiefSprite.java ├── UndeadSprite.java ├── WandmakerSprite.java ├── WarlockSprite.java ├── WraithSprite.java └── YogSprite.java ├── ui ├── Archs.java ├── AttackIndicator.java ├── BadgesList.java ├── Banner.java ├── BuffIndicator.java ├── BusyIndicator.java ├── CheckBox.java ├── Compass.java ├── DangerIndicator.java ├── ExitButton.java ├── GameLog.java ├── GoldIndicator.java ├── HealthIndicator.java ├── Icons.java ├── ItemSlot.java ├── LootIndicator.java ├── PrefsButton.java ├── QuickSlotButton.java ├── RedButton.java ├── ResumeIndicator.java ├── ScrollPane.java ├── SimpleButton.java ├── StatusPane.java ├── Tag.java ├── Toast.java ├── Toolbar.java └── Window.java ├── utils ├── BArray.java ├── GLog.java └── Utils.java └── windows ├── IconTitle.java ├── WndBadge.java ├── WndBag.java ├── WndBlacksmith.java ├── WndCatalogus.java ├── WndChallenges.java ├── WndChanges.java ├── WndChooseWay.java ├── WndClass.java ├── WndError.java ├── WndGame.java ├── WndHero.java ├── WndImp.java ├── WndInfoCell.java ├── WndInfoItem.java ├── WndInfoMob.java ├── WndInfoPlant.java ├── WndItem.java ├── WndJournal.java ├── WndList.java ├── WndMessage.java ├── WndOptions.java ├── WndQuest.java ├── WndRanking.java ├── WndResurrect.java ├── WndSadGhost.java ├── WndSettings.java ├── WndStory.java ├── WndTabbed.java ├── WndTitledMessage.java ├── WndTradeItem.java └── WndWandmaker.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | 15 | # Gradle files 16 | .gradle/ 17 | build/ 18 | 19 | # Local configuration file (sdk path, etc) 20 | local.properties 21 | 22 | # Proguard folder generated by Eclipse 23 | proguard/ 24 | 25 | # Log Files 26 | *.log 27 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | SoftPixelDungeon 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | 35 | PD-classes-master 36 | 2 37 | D:/Data/Projects/Android/PD-classes-master 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 18 | 19 | 23 | 24 | 25 | 30 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # soft-pixel-dungeon 2 | A not-so-hard version of Shattered Pixel Dungeon which is an improved version of Pixel Dungeon 3 | 4 | Pixel Dungeon is a great game that everyone should enjoy. Unfortunately permadeath and the randomness make it a very hard game to play. This variation makes it a bit less hard if you so choose. 5 | 6 | This adds the ability to save and load games to the sd card. 7 | It also adds a setting to make the game not so hard: useful things dropped in long grass, increased search radius. 8 | 9 | 10 | -------------------------------------------------------------------------------- /assets/amulet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/amulet.png -------------------------------------------------------------------------------- /assets/arcs1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/arcs1.png -------------------------------------------------------------------------------- /assets/arcs2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/arcs2.png -------------------------------------------------------------------------------- /assets/avatars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/avatars.png -------------------------------------------------------------------------------- /assets/badges.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/badges.png -------------------------------------------------------------------------------- /assets/banners.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/banners.png -------------------------------------------------------------------------------- /assets/banners_wm_.pspimage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/banners_wm_.pspimage -------------------------------------------------------------------------------- /assets/bat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/bat.png -------------------------------------------------------------------------------- /assets/blacksmith.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/blacksmith.png -------------------------------------------------------------------------------- /assets/brute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/brute.png -------------------------------------------------------------------------------- /assets/buffs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/buffs.png -------------------------------------------------------------------------------- /assets/burning_fist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/burning_fist.png -------------------------------------------------------------------------------- /assets/chrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/chrome.png -------------------------------------------------------------------------------- /assets/crab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/crab.png -------------------------------------------------------------------------------- /assets/dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/dashboard.png -------------------------------------------------------------------------------- /assets/demon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/demon.png -------------------------------------------------------------------------------- /assets/dm300.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/dm300.png -------------------------------------------------------------------------------- /assets/effects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/effects.png -------------------------------------------------------------------------------- /assets/elemental.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/elemental.png -------------------------------------------------------------------------------- /assets/exp_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/exp_bar.png -------------------------------------------------------------------------------- /assets/eye.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/eye.png -------------------------------------------------------------------------------- /assets/fireball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/fireball.png -------------------------------------------------------------------------------- /assets/font15x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/font15x.png -------------------------------------------------------------------------------- /assets/font1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/font1x.png -------------------------------------------------------------------------------- /assets/font25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/font25x.png -------------------------------------------------------------------------------- /assets/font2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/font2x.png -------------------------------------------------------------------------------- /assets/font3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/font3x.png -------------------------------------------------------------------------------- /assets/game.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/game.mp3 -------------------------------------------------------------------------------- /assets/ghost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/ghost.png -------------------------------------------------------------------------------- /assets/gnoll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/gnoll.png -------------------------------------------------------------------------------- /assets/golem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/golem.png -------------------------------------------------------------------------------- /assets/goo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/goo.png -------------------------------------------------------------------------------- /assets/hp_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/hp_bar.png -------------------------------------------------------------------------------- /assets/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/icons.png -------------------------------------------------------------------------------- /assets/icons_orig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/icons_orig.png -------------------------------------------------------------------------------- /assets/icons_original.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/icons_original.png -------------------------------------------------------------------------------- /assets/items.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/items.png -------------------------------------------------------------------------------- /assets/king.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/king.png -------------------------------------------------------------------------------- /assets/large_buffs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/large_buffs.png -------------------------------------------------------------------------------- /assets/larva.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/larva.png -------------------------------------------------------------------------------- /assets/mage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/mage.png -------------------------------------------------------------------------------- /assets/monk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/monk.png -------------------------------------------------------------------------------- /assets/pet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/pet.png -------------------------------------------------------------------------------- /assets/piranha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/piranha.png -------------------------------------------------------------------------------- /assets/plants.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/plants.png -------------------------------------------------------------------------------- /assets/pspbrwse.jbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/pspbrwse.jbf -------------------------------------------------------------------------------- /assets/ranger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/ranger.png -------------------------------------------------------------------------------- /assets/rat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/rat.png -------------------------------------------------------------------------------- /assets/ratking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/ratking.png -------------------------------------------------------------------------------- /assets/rogue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/rogue.png -------------------------------------------------------------------------------- /assets/rotting_fist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/rotting_fist.png -------------------------------------------------------------------------------- /assets/scorpio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/scorpio.png -------------------------------------------------------------------------------- /assets/shaman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/shaman.png -------------------------------------------------------------------------------- /assets/sheep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/sheep.png -------------------------------------------------------------------------------- /assets/shopkeeper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/shopkeeper.png -------------------------------------------------------------------------------- /assets/skeleton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/skeleton.png -------------------------------------------------------------------------------- /assets/snd_alert.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_alert.mp3 -------------------------------------------------------------------------------- /assets/snd_badge.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_badge.mp3 -------------------------------------------------------------------------------- /assets/snd_beacon.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_beacon.mp3 -------------------------------------------------------------------------------- /assets/snd_blast.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_blast.mp3 -------------------------------------------------------------------------------- /assets/snd_bones.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_bones.mp3 -------------------------------------------------------------------------------- /assets/snd_boss.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_boss.mp3 -------------------------------------------------------------------------------- /assets/snd_burning.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_burning.mp3 -------------------------------------------------------------------------------- /assets/snd_challenge.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_challenge.mp3 -------------------------------------------------------------------------------- /assets/snd_charms.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_charms.mp3 -------------------------------------------------------------------------------- /assets/snd_click.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_click.mp3 -------------------------------------------------------------------------------- /assets/snd_cursed.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_cursed.mp3 -------------------------------------------------------------------------------- /assets/snd_death.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_death.mp3 -------------------------------------------------------------------------------- /assets/snd_descend.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_descend.mp3 -------------------------------------------------------------------------------- /assets/snd_dewdrop.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_dewdrop.mp3 -------------------------------------------------------------------------------- /assets/snd_door_open.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_door_open.mp3 -------------------------------------------------------------------------------- /assets/snd_drink.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_drink.mp3 -------------------------------------------------------------------------------- /assets/snd_eat.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_eat.mp3 -------------------------------------------------------------------------------- /assets/snd_evoke.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_evoke.mp3 -------------------------------------------------------------------------------- /assets/snd_falling.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_falling.mp3 -------------------------------------------------------------------------------- /assets/snd_ghost.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_ghost.mp3 -------------------------------------------------------------------------------- /assets/snd_gold.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_gold.mp3 -------------------------------------------------------------------------------- /assets/snd_hit.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_hit.mp3 -------------------------------------------------------------------------------- /assets/snd_item.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_item.mp3 -------------------------------------------------------------------------------- /assets/snd_levelup.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_levelup.mp3 -------------------------------------------------------------------------------- /assets/snd_lightning.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_lightning.mp3 -------------------------------------------------------------------------------- /assets/snd_lullaby.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_lullaby.mp3 -------------------------------------------------------------------------------- /assets/snd_mastery.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_mastery.mp3 -------------------------------------------------------------------------------- /assets/snd_meld.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_meld.mp3 -------------------------------------------------------------------------------- /assets/snd_miss.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_miss.mp3 -------------------------------------------------------------------------------- /assets/snd_plant.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_plant.mp3 -------------------------------------------------------------------------------- /assets/snd_puff.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_puff.mp3 -------------------------------------------------------------------------------- /assets/snd_ray.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_ray.mp3 -------------------------------------------------------------------------------- /assets/snd_read.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_read.mp3 -------------------------------------------------------------------------------- /assets/snd_rocks.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_rocks.mp3 -------------------------------------------------------------------------------- /assets/snd_secret.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_secret.mp3 -------------------------------------------------------------------------------- /assets/snd_shatter.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_shatter.mp3 -------------------------------------------------------------------------------- /assets/snd_step.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_step.mp3 -------------------------------------------------------------------------------- /assets/snd_teleport.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_teleport.mp3 -------------------------------------------------------------------------------- /assets/snd_tomb.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_tomb.mp3 -------------------------------------------------------------------------------- /assets/snd_trap.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_trap.mp3 -------------------------------------------------------------------------------- /assets/snd_unlock.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_unlock.mp3 -------------------------------------------------------------------------------- /assets/snd_water.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_water.mp3 -------------------------------------------------------------------------------- /assets/snd_zap.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/snd_zap.mp3 -------------------------------------------------------------------------------- /assets/specks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/specks.png -------------------------------------------------------------------------------- /assets/spell_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/spell_icons.png -------------------------------------------------------------------------------- /assets/spinner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/spinner.png -------------------------------------------------------------------------------- /assets/statue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/statue.png -------------------------------------------------------------------------------- /assets/status_pane.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/status_pane.png -------------------------------------------------------------------------------- /assets/succubus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/succubus.png -------------------------------------------------------------------------------- /assets/surface.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/surface.mp3 -------------------------------------------------------------------------------- /assets/surface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/surface.png -------------------------------------------------------------------------------- /assets/swarm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/swarm.png -------------------------------------------------------------------------------- /assets/tengu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/tengu.png -------------------------------------------------------------------------------- /assets/theme.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/theme.mp3 -------------------------------------------------------------------------------- /assets/thief.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/thief.png -------------------------------------------------------------------------------- /assets/tiles0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/tiles0.png -------------------------------------------------------------------------------- /assets/tiles1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/tiles1.png -------------------------------------------------------------------------------- /assets/tiles2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/tiles2.png -------------------------------------------------------------------------------- /assets/tiles3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/tiles3.png -------------------------------------------------------------------------------- /assets/tiles4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/tiles4.png -------------------------------------------------------------------------------- /assets/toolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/toolbar.png -------------------------------------------------------------------------------- /assets/undead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/undead.png -------------------------------------------------------------------------------- /assets/wandmaker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/wandmaker.png -------------------------------------------------------------------------------- /assets/warlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/warlock.png -------------------------------------------------------------------------------- /assets/warrior.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/warrior.png -------------------------------------------------------------------------------- /assets/water0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/water0.png -------------------------------------------------------------------------------- /assets/water1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/water1.png -------------------------------------------------------------------------------- /assets/water2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/water2.png -------------------------------------------------------------------------------- /assets/water3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/water3.png -------------------------------------------------------------------------------- /assets/water4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/water4.png -------------------------------------------------------------------------------- /assets/wraith.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/wraith.png -------------------------------------------------------------------------------- /assets/yog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/assets/yog.png -------------------------------------------------------------------------------- /project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-14 15 | -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-hdpi/pspbrwse.jbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/res/drawable-hdpi/pspbrwse.jbf -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-mdpi/pspbrwse.jbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/res/drawable-mdpi/pspbrwse.jbf -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/pspbrwse.jbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/res/drawable-xhdpi/pspbrwse.jbf -------------------------------------------------------------------------------- /res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/pspbrwse.jbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/res/drawable-xxhdpi/pspbrwse.jbf -------------------------------------------------------------------------------- /res/drawable-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/res/drawable-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-xxxhdpi/pspbrwse.jbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolispace/soft-pixel-dungeon/eb219ef8b3d4644371c4fcdf57c167ed3418628b/res/drawable-xxxhdpi/pspbrwse.jbf -------------------------------------------------------------------------------- /res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Soft Pixel Dungeon 5 | 6 | -------------------------------------------------------------------------------- /res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 14 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/Challenges.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon; 19 | 20 | public class Challenges { 21 | 22 | public static final int NO_FOOD = 1; 23 | public static final int NO_ARMOR = 2; 24 | public static final int NO_HEALING = 4; 25 | public static final int NO_HERBALISM = 8; 26 | public static final int SWARM_INTELLIGENCE = 16; 27 | public static final int DARKNESS = 32; 28 | 29 | public static final String[] NAMES = { 30 | "No food", 31 | "No armors", 32 | "No healing potions", 33 | "No dew, no seeds", 34 | "Swarm intelligence", 35 | "Darkness" 36 | }; 37 | 38 | public static final int[] MASKS = { 39 | NO_FOOD, NO_ARMOR, NO_HEALING, NO_HERBALISM, SWARM_INTELLIGENCE, DARKNESS 40 | }; 41 | 42 | } -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/ResultDescriptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon; 19 | 20 | public class ResultDescriptions { 21 | 22 | // Mobs 23 | public static final String MOB = "Killed by %s"; 24 | public static final String UNIQUE = "Killed by the %s"; 25 | public static final String NAMED = "Killed by %s"; 26 | 27 | // Items 28 | public static final String ITEM = "Killed by your own %s"; 29 | public static final String GLYPH = "Killed by the %s"; 30 | 31 | // Dungeon features 32 | public static final String TRAP = "Killed by a %s"; 33 | 34 | // Debuffs & blobs 35 | public static final String BURNING = "Burned to Ash"; 36 | public static final String HUNGER = "Starved to Death"; 37 | public static final String POISON = "Succumbed to Poison"; 38 | public static final String GAS = "Asphyxiated"; 39 | public static final String BLEEDING = "Bled to Death"; 40 | public static final String OOZE = "Melted Away"; 41 | public static final String FALL = "Died on Impact"; 42 | 43 | public static final String WIN = "Obtained the Amulet of Yendor"; 44 | } 45 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/StenchGas.java: -------------------------------------------------------------------------------- 1 | package com.shatteredpixel.shatteredpixeldungeon.actors.blobs; 2 | 3 | import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; 4 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 5 | import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; 6 | import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; 7 | import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter; 8 | import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; 9 | 10 | /** 11 | * Created by debenhame on 08/10/2014. 12 | */ 13 | public class StenchGas extends Blob { 14 | 15 | @Override 16 | protected void evolve() { 17 | super.evolve(); 18 | 19 | Char ch; 20 | for (int i=0; i < LENGTH; i++) { 21 | if (cur[i] > 0 && (ch = Actor.findChar(i)) != null) { 22 | if (!ch.immunities().contains(this.getClass())) 23 | Buff.prolong( ch, Paralysis.class, Paralysis.duration( ch )/5 ); 24 | } 25 | } 26 | } 27 | 28 | @Override 29 | public void use( BlobEmitter emitter ) { 30 | super.use( emitter ); 31 | 32 | emitter.pour( Speck.factory(Speck.STENCH), 0.6f ); 33 | } 34 | 35 | @Override 36 | public String tileDesc() { 37 | return "A cloud of fetid stench is swirling here."; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Amok.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; 21 | 22 | public class Amok extends FlavourBuff { 23 | 24 | @Override 25 | public int icon() { 26 | return BuffIndicator.AMOK; 27 | } 28 | 29 | @Override 30 | public String toString() { 31 | return "Amok"; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Awareness.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.Dungeon; 21 | 22 | public class Awareness extends FlavourBuff { 23 | 24 | public static final float DURATION = 2f; 25 | 26 | @Override 27 | public void detach() { 28 | super.detach(); 29 | Dungeon.observe(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Barkskin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; 21 | 22 | public class Barkskin extends Buff { 23 | 24 | private int level = 0; 25 | 26 | @Override 27 | public boolean act() { 28 | if (target.isAlive()) { 29 | 30 | spend( TICK ); 31 | if (--level <= 0) { 32 | detach(); 33 | } 34 | 35 | } else { 36 | 37 | detach(); 38 | 39 | } 40 | 41 | return true; 42 | } 43 | 44 | public int level() { 45 | return level; 46 | } 47 | 48 | public void level( int value ) { 49 | if (level < value) { 50 | level = value; 51 | } 52 | } 53 | 54 | @Override 55 | public int icon() { 56 | return BuffIndicator.BARKSKIN; 57 | } 58 | 59 | @Override 60 | public String toString() { 61 | return "Barkskin"; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Blindness.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.Dungeon; 21 | import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; 22 | 23 | public class Blindness extends FlavourBuff { 24 | 25 | @Override 26 | public void detach() { 27 | super.detach(); 28 | Dungeon.observe(); 29 | } 30 | 31 | @Override 32 | public int icon() { 33 | return BuffIndicator.BLINDNESS; 34 | } 35 | 36 | @Override 37 | public String toString() { 38 | return "Blinded"; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Charm.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 21 | import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfElements.Resistance; 22 | import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; 23 | 24 | public class Charm extends FlavourBuff { 25 | 26 | @Override 27 | public boolean attachTo( Char target ) { 28 | if (super.attachTo( target )) { 29 | target.pacified = true; 30 | return true; 31 | } else { 32 | return false; 33 | } 34 | } 35 | 36 | @Override 37 | public void detach() { 38 | target.pacified = false; 39 | super.detach(); 40 | } 41 | 42 | @Override 43 | public int icon() { 44 | return BuffIndicator.HEART; 45 | } 46 | 47 | @Override 48 | public String toString() { 49 | return "Charmed"; 50 | } 51 | 52 | public static float durationFactor( Char ch ) { 53 | Resistance r = ch.buff( Resistance.class ); 54 | return r != null ? r.durationFactor() : 1; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Cripple.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; 21 | 22 | public class Cripple extends FlavourBuff { 23 | 24 | public static final float DURATION = 10f; 25 | 26 | @Override 27 | public int icon() { 28 | return BuffIndicator.CRIPPLE; 29 | } 30 | 31 | @Override 32 | public String toString() { 33 | return "Crippled"; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 21 | import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; 22 | import com.watabou.utils.Random; 23 | 24 | public class Drowsy extends Buff { 25 | 26 | @Override 27 | public int icon() { 28 | return BuffIndicator.DROWSY; 29 | } 30 | 31 | public boolean attachTo( Char target ) { 32 | if (!target.immunities().contains(Sleep.class) && super.attachTo(target)) { 33 | if (cooldown() == 0) 34 | spend(Random.Int(3, 6)); 35 | return true; 36 | } 37 | return false; 38 | } 39 | 40 | @Override 41 | public boolean act(){ 42 | Buff.affect(target, MagicalSleep.class); 43 | 44 | detach(); 45 | return true; 46 | } 47 | 48 | @Override 49 | public String toString() { 50 | return "Drowsy"; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/EarthImbue.java: -------------------------------------------------------------------------------- 1 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 2 | 3 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 4 | import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; 5 | import com.shatteredpixel.shatteredpixeldungeon.effects.particles.EarthParticle; 6 | import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; 7 | import com.watabou.utils.Bundle; 8 | 9 | import java.util.HashSet; 10 | 11 | /** 12 | * Created by debenhame on 19/11/2014. 13 | */ 14 | public class EarthImbue extends FlavourBuff { 15 | 16 | public static final float DURATION = 30f; 17 | 18 | public void proc(Char enemy){ 19 | Buff.affect(enemy, Roots.class, 2); 20 | CellEmitter.bottom(enemy.pos).start(EarthParticle.FACTORY, 0.05f, 8); 21 | } 22 | 23 | @Override 24 | public int icon() { 25 | return BuffIndicator.ROOTS; 26 | } 27 | 28 | @Override 29 | public String toString() { 30 | return "Imbued with Earth"; 31 | } 32 | 33 | { 34 | immunities.add( Paralysis.class ); 35 | immunities.add( Roots.class ); 36 | immunities.add( Slow.class ); 37 | } 38 | } -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/FlavourBuff.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 19 | 20 | //Special kind of buff, that doesn't perform any kind actions 21 | public class FlavourBuff extends Buff { 22 | 23 | @Override 24 | public boolean act() { 25 | detach(); 26 | return true; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Fury.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; 21 | 22 | public class Fury extends Buff { 23 | 24 | public static float LEVEL = 0.4f; 25 | 26 | @Override 27 | public boolean act() { 28 | if (target.HP > target.HT * LEVEL) { 29 | detach(); 30 | } 31 | 32 | spend( TICK ); 33 | 34 | return true; 35 | } 36 | 37 | @Override 38 | public int icon() { 39 | return BuffIndicator.FURY; 40 | } 41 | 42 | @Override 43 | public String toString() { 44 | return "Fury"; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/GasesImmunity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ConfusionGas; 21 | import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ParalyticGas; 22 | import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.StenchGas; 23 | import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas; 24 | import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; 25 | 26 | import java.util.HashSet; 27 | 28 | public class GasesImmunity extends FlavourBuff { 29 | 30 | public static final float DURATION = 10f; 31 | 32 | @Override 33 | public int icon() { 34 | return BuffIndicator.IMMUNITY; 35 | } 36 | 37 | @Override 38 | public String toString() { 39 | return "Immune to gases"; 40 | } 41 | 42 | { 43 | immunities.add( ParalyticGas.class ); 44 | immunities.add( ToxicGas.class ); 45 | immunities.add( ConfusionGas.class ); 46 | immunities.add( StenchGas.class ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Levitation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.Dungeon; 21 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 22 | import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; 23 | 24 | public class Levitation extends FlavourBuff { 25 | 26 | public static final float DURATION = 20f; 27 | 28 | @Override 29 | public boolean attachTo( Char target ) { 30 | if (super.attachTo( target )) { 31 | target.flying = true; 32 | Roots.detach( target, Roots.class ); 33 | return true; 34 | } else { 35 | return false; 36 | } 37 | } 38 | 39 | @Override 40 | public void detach() { 41 | target.flying = false; 42 | Dungeon.level.press( target.pos, target ); 43 | super.detach(); 44 | } 45 | 46 | @Override 47 | public int icon() { 48 | return BuffIndicator.LEVITATION; 49 | } 50 | 51 | @Override 52 | public String toString() { 53 | return "Levitating"; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MindVision.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.Dungeon; 21 | import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; 22 | 23 | public class MindVision extends FlavourBuff { 24 | 25 | public static final float DURATION = 20f; 26 | 27 | public int distance = 2; 28 | 29 | @Override 30 | public int icon() { 31 | return BuffIndicator.MIND_VISION; 32 | } 33 | 34 | @Override 35 | public String toString() { 36 | return "Mind vision"; 37 | } 38 | 39 | @Override 40 | public void detach() { 41 | super.detach(); 42 | Dungeon.observe(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Roots.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 21 | import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; 22 | 23 | public class Roots extends FlavourBuff { 24 | 25 | @Override 26 | public boolean attachTo( Char target ) { 27 | if (!target.flying && super.attachTo( target )) { 28 | target.rooted = true; 29 | return true; 30 | } else { 31 | return false; 32 | } 33 | } 34 | 35 | @Override 36 | public void detach() { 37 | target.rooted = false; 38 | super.detach(); 39 | } 40 | 41 | @Override 42 | public int icon() { 43 | return BuffIndicator.ROOTS; 44 | } 45 | 46 | @Override 47 | public String toString() { 48 | return "Rooted"; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Sleep.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 19 | 20 | public class Sleep extends FlavourBuff { 21 | 22 | public static final float SWS = 1.5f; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Slow.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 21 | import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfElements.Resistance; 22 | import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; 23 | 24 | public class Slow extends FlavourBuff { 25 | 26 | private static final float DURATION = 10f; 27 | 28 | @Override 29 | public int icon() { 30 | return BuffIndicator.SLOW; 31 | } 32 | 33 | @Override 34 | public String toString() { 35 | return "Slowed"; 36 | } 37 | 38 | public static float duration( Char ch ) { 39 | Resistance r = ch.buff( Resistance.class ); 40 | return r != null ? r.durationFactor() * DURATION : DURATION; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SnipersMark.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; 21 | 22 | public class SnipersMark extends FlavourBuff { 23 | 24 | @Override 25 | public int icon() { 26 | return BuffIndicator.MARK; 27 | } 28 | 29 | @Override 30 | public String toString() { 31 | return "Sniper's mark"; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Speed.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 19 | 20 | public class Speed extends FlavourBuff { 21 | 22 | public static final float DURATION = 10f; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Terror.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.Dungeon; 21 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 22 | import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; 23 | import com.watabou.utils.Bundle; 24 | 25 | public class Terror extends FlavourBuff { 26 | 27 | public static final float DURATION = 10f; 28 | public Char source; 29 | 30 | @Override 31 | public int icon() { 32 | return BuffIndicator.TERROR; 33 | } 34 | 35 | @Override 36 | public void restoreFromBundle( Bundle bundle ) { 37 | super.restoreFromBundle( bundle ); 38 | // It's not really correct... 39 | source = Dungeon.hero; 40 | } 41 | 42 | @Override 43 | public String toString() { 44 | return "Terror"; 45 | } 46 | 47 | public static void recover( Char target ) { 48 | Terror terror = target.buff( Terror.class ); 49 | if (terror != null && terror.cooldown() < DURATION) { 50 | target.remove( terror ); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ToxicImbue.java: -------------------------------------------------------------------------------- 1 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 2 | 3 | import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob; 4 | import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas; 5 | import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; 6 | import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; 7 | import com.watabou.utils.Bundle; 8 | 9 | import java.util.HashSet; 10 | 11 | /** 12 | * Created by debenhame on 19/11/2014. 13 | */ 14 | public class ToxicImbue extends Buff { 15 | 16 | public static final float DURATION = 30f; 17 | 18 | protected float left; 19 | 20 | private static final String LEFT = "left"; 21 | 22 | @Override 23 | public void storeInBundle( Bundle bundle ) { 24 | super.storeInBundle( bundle ); 25 | bundle.put( LEFT, left ); 26 | 27 | } 28 | 29 | @Override 30 | public void restoreFromBundle( Bundle bundle ) { 31 | super.restoreFromBundle( bundle ); 32 | left = bundle.getFloat( LEFT ); 33 | } 34 | 35 | public void set( float duration ) { 36 | this.left = duration; 37 | }; 38 | 39 | 40 | @Override 41 | public boolean act() { 42 | GameScene.add(Blob.seed(target.pos, 50, ToxicGas.class)); 43 | 44 | spend(TICK); 45 | left -= TICK; 46 | if (left <= 0) 47 | detach(); 48 | 49 | return true; 50 | } 51 | 52 | @Override 53 | public int icon() { 54 | return BuffIndicator.IMMUNITY; 55 | } 56 | 57 | @Override 58 | public String toString() { 59 | return "Imbued with Toxicity"; 60 | } 61 | 62 | { 63 | immunities.add( ToxicGas.class ); 64 | immunities.add( Poison.class ); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Vertigo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2014 Oleg Dolya 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see 16 | */ 17 | package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; 18 | 19 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 20 | import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfElements.Resistance; 21 | import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; 22 | 23 | public class Vertigo extends FlavourBuff { 24 | 25 | public static final float DURATION = 10f; 26 | 27 | @Override 28 | public int icon() { 29 | return BuffIndicator.VERTIGO; 30 | } 31 | 32 | @Override 33 | public String toString() { 34 | return "Vertigo"; 35 | } 36 | 37 | public static float duration( Char ch ) { 38 | Resistance r = ch.buff( Resistance.class ); 39 | return r != null ? r.durationFactor() * DURATION : DURATION; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Acidic.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.mobs; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.Badges; 21 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 22 | import com.shatteredpixel.shatteredpixeldungeon.sprites.AcidicSprite; 23 | import com.watabou.utils.Random; 24 | 25 | public class Acidic extends Scorpio { 26 | 27 | { 28 | name = "acidic scorpio"; 29 | spriteClass = AcidicSprite.class; 30 | } 31 | 32 | @Override 33 | public int defenseProc( Char enemy, int damage ) { 34 | 35 | int dmg = Random.IntRange( 0, damage ); 36 | if (dmg > 0) { 37 | enemy.damage( dmg, this ); 38 | } 39 | 40 | return super.defenseProc( enemy, damage ); 41 | } 42 | 43 | @Override 44 | public void die( Object cause ) { 45 | super.die( cause ); 46 | Badges.validateRare( this ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Rat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.mobs; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 21 | import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost; 22 | import com.shatteredpixel.shatteredpixeldungeon.sprites.RatSprite; 23 | import com.watabou.utils.Random; 24 | 25 | public class Rat extends Mob { 26 | 27 | { 28 | name = "marsupial rat"; 29 | spriteClass = RatSprite.class; 30 | 31 | HP = HT = 8; 32 | defenseSkill = 3; 33 | 34 | maxLvl = 5; 35 | } 36 | 37 | @Override 38 | public int damageRoll() { 39 | return Random.NormalIntRange( 1, 5 ); 40 | } 41 | 42 | @Override 43 | public int attackSkill( Char target ) { 44 | return 8; 45 | } 46 | 47 | @Override 48 | public int dr() { 49 | return 1; 50 | } 51 | 52 | @Override 53 | public String description() { 54 | return 55 | "Marsupial rats are aggressive but rather weak denizens " + 56 | "of the sewers. They have a nasty bite, but are only life threatening in large numbers."; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Senior.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.mobs; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.Badges; 21 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 22 | import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; 23 | import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; 24 | import com.shatteredpixel.shatteredpixeldungeon.sprites.SeniorSprite; 25 | import com.watabou.utils.Random; 26 | 27 | public class Senior extends Monk { 28 | 29 | { 30 | name = "senior monk"; 31 | spriteClass = SeniorSprite.class; 32 | } 33 | 34 | @Override 35 | public int damageRoll() { 36 | return Random.NormalIntRange( 12, 20 ); 37 | } 38 | 39 | @Override 40 | public int attackProc( Char enemy, int damage ) { 41 | if (Random.Int( 10 ) == 0) { 42 | Buff.prolong( enemy, Paralysis.class, 1.1f ); 43 | } 44 | return super.attackProc( enemy, damage ); 45 | } 46 | 47 | @Override 48 | public void die( Object cause ) { 49 | super.die( cause ); 50 | Badges.validateRare( this ); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Shielded.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.mobs; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.Badges; 21 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ShieldedSprite; 22 | 23 | public class Shielded extends Brute { 24 | 25 | { 26 | name = "shielded brute"; 27 | spriteClass = ShieldedSprite.class; 28 | 29 | defenseSkill = 20; 30 | } 31 | 32 | @Override 33 | public int dr() { 34 | return 10; 35 | } 36 | 37 | @Override 38 | public String defenseVerb() { 39 | return "blocked"; 40 | } 41 | 42 | @Override 43 | public void die( Object cause ) { 44 | super.die( cause ); 45 | Badges.validateRare( this ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/NPC.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.Dungeon; 21 | import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; 22 | import com.shatteredpixel.shatteredpixeldungeon.items.Heap; 23 | import com.shatteredpixel.shatteredpixeldungeon.levels.Level; 24 | import com.watabou.utils.Random; 25 | 26 | public abstract class NPC extends Mob { 27 | 28 | { 29 | HP = HT = 1; 30 | EXP = 0; 31 | 32 | hostile = false; 33 | state = PASSIVE; 34 | } 35 | 36 | protected void throwItem() { 37 | Heap heap = Dungeon.level.heaps.get( pos ); 38 | if (heap != null) { 39 | int n; 40 | do { 41 | n = pos + Level.NEIGHBOURS8[Random.Int( 8 )]; 42 | } while (!Level.passable[n] && !Level.avoid[n]); 43 | Dungeon.level.drop( heap.pickUp(), n ).sprite.drop( pos ); 44 | } 45 | } 46 | 47 | @Override 48 | public void beckon( int cell ) { 49 | } 50 | 51 | abstract public void interact(); 52 | } -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/effects/CheckedCell.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.effects; 19 | 20 | import com.watabou.gltextures.TextureCache; 21 | import com.watabou.noosa.Game; 22 | import com.watabou.noosa.Image; 23 | import com.shatteredpixel.shatteredpixeldungeon.DungeonTilemap; 24 | 25 | public class CheckedCell extends Image { 26 | 27 | private float alpha; 28 | 29 | public CheckedCell( int pos ) { 30 | super( TextureCache.createSolid( 0xFF55AAFF ) ); 31 | 32 | origin.set( 0.5f ); 33 | 34 | point( DungeonTilemap.tileToWorld( pos ).offset( 35 | DungeonTilemap.SIZE / 2, 36 | DungeonTilemap.SIZE / 2 ) ); 37 | 38 | alpha = 0.8f; 39 | } 40 | 41 | @Override 42 | public void update() { 43 | if ((alpha -= Game.elapsed) > 0) { 44 | alpha( alpha ); 45 | scale.set( DungeonTilemap.SIZE * alpha ); 46 | } else { 47 | killAndErase(); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/effects/Effects.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.effects; 19 | 20 | import com.watabou.noosa.Image; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | 23 | public class Effects { 24 | 25 | public enum Type { 26 | RIPPLE, 27 | LIGHTNING, 28 | WOUND, 29 | RAY 30 | }; 31 | 32 | public static Image get( Type type ) { 33 | Image icon = new Image( Assets.EFFECTS ); 34 | switch (type) { 35 | case RIPPLE: 36 | icon.frame( icon.texture.uvRect( 0, 0, 16, 16 ) ); 37 | break; 38 | case LIGHTNING: 39 | icon.frame( icon.texture.uvRect( 16, 0, 32, 8 ) ); 40 | break; 41 | case WOUND: 42 | icon.frame( icon.texture.uvRect( 16, 8, 32, 16 ) ); 43 | break; 44 | case RAY: 45 | icon.frame( icon.texture.uvRect( 16, 16, 32, 24 ) ); 46 | break; 47 | } 48 | return icon; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/effects/Ripple.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.effects; 19 | 20 | import com.watabou.noosa.Game; 21 | import com.watabou.noosa.Image; 22 | import com.shatteredpixel.shatteredpixeldungeon.DungeonTilemap; 23 | import com.shatteredpixel.shatteredpixeldungeon.levels.Level; 24 | 25 | public class Ripple extends Image { 26 | 27 | private static final float TIME_TO_FADE = 0.5f; 28 | 29 | private float time; 30 | 31 | public Ripple() { 32 | super( Effects.get( Effects.Type.RIPPLE ) ); 33 | } 34 | 35 | public void reset( int p ) { 36 | revive(); 37 | 38 | x = (p % Level.WIDTH) * DungeonTilemap.SIZE; 39 | y = (p / Level.WIDTH) * DungeonTilemap.SIZE; 40 | 41 | origin.set( width / 2, height / 2 ); 42 | scale.set( 0 ); 43 | 44 | time = TIME_TO_FADE; 45 | } 46 | 47 | @Override 48 | public void update() { 49 | super.update(); 50 | 51 | if ((time -= Game.elapsed) <= 0) { 52 | kill(); 53 | } else { 54 | float p = time / TIME_TO_FADE; 55 | scale.set( 1 - p ); 56 | alpha( p ); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/BloodParticle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.effects.particles; 19 | 20 | import com.watabou.noosa.particles.Emitter; 21 | import com.watabou.noosa.particles.PixelParticle; 22 | import com.watabou.noosa.particles.Emitter.Factory; 23 | 24 | public class BloodParticle extends PixelParticle.Shrinking { 25 | 26 | public static final Emitter.Factory FACTORY = new Factory() { 27 | @Override 28 | public void emit( Emitter emitter, int index, float x, float y ) { 29 | ((BloodParticle)emitter.recycle( BloodParticle.class )).reset( x, y ); 30 | } 31 | }; 32 | 33 | public BloodParticle() { 34 | super(); 35 | 36 | color( 0xCC0000 ); 37 | lifespan = 0.8f; 38 | 39 | acc.set( 0, +40 ); 40 | } 41 | 42 | public void reset( float x, float y ) { 43 | revive(); 44 | 45 | this.x = x; 46 | this.y = y; 47 | 48 | left = lifespan; 49 | 50 | size = 4; 51 | speed.set( 0 ); 52 | } 53 | 54 | @Override 55 | public void update() { 56 | super.update(); 57 | float p = left / lifespan; 58 | am = p > 0.6f ? (1 - p) * 2.5f : 1; 59 | } 60 | } -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/GooWarnParticle.java: -------------------------------------------------------------------------------- 1 | package com.shatteredpixel.shatteredpixeldungeon.effects.particles; 2 | 3 | import com.watabou.noosa.particles.Emitter; 4 | 5 | /** 6 | * Created by Evan on 30/09/2014. 7 | */ 8 | public class GooWarnParticle extends FlameParticle { 9 | 10 | public static final Emitter.Factory FACTORY = new Emitter.Factory() { 11 | @Override 12 | public void emit( Emitter emitter, int index, float x, float y ) { 13 | ((GooWarnParticle)emitter.recycle( GooWarnParticle.class )).reset( x, y ); 14 | } 15 | }; 16 | 17 | @Override 18 | public void update() { 19 | super.update(); 20 | 21 | float p = left / lifespan; 22 | color( 0x000000 ); 23 | am = p > 0.5f ? (1.2f - p*0.8f) : (p*3 - 0.7f); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SnowParticle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.effects.particles; 19 | 20 | import com.watabou.noosa.particles.Emitter; 21 | import com.watabou.noosa.particles.PixelParticle; 22 | import com.watabou.noosa.particles.Emitter.Factory; 23 | import com.watabou.utils.Random; 24 | 25 | public class SnowParticle extends PixelParticle { 26 | 27 | public static final Emitter.Factory FACTORY = new Factory() { 28 | @Override 29 | public void emit( Emitter emitter, int index, float x, float y ) { 30 | ((SnowParticle)emitter.recycle( SnowParticle.class )).reset( x, y ); 31 | } 32 | }; 33 | 34 | public SnowParticle() { 35 | super(); 36 | speed.set( 0, Random.Float( 5, 8 ) ); 37 | lifespan = 1.2f; 38 | } 39 | 40 | public void reset( float x, float y ) { 41 | revive(); 42 | 43 | this.x = x; 44 | this.y = y - speed.y * lifespan; 45 | 46 | left = lifespan; 47 | } 48 | 49 | @Override 50 | public void update() { 51 | super.update(); 52 | float p = left / lifespan; 53 | am = (p < 0.5f ? p : 1 - p) * 1.5f; 54 | } 55 | } -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/WoolParticle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.effects.particles; 19 | 20 | import com.watabou.noosa.particles.Emitter; 21 | import com.watabou.noosa.particles.PixelParticle; 22 | import com.watabou.noosa.particles.Emitter.Factory; 23 | import com.watabou.utils.ColorMath; 24 | import com.watabou.utils.Random; 25 | 26 | public class WoolParticle extends PixelParticle.Shrinking { 27 | 28 | public static final Emitter.Factory FACTORY = new Factory() { 29 | @Override 30 | public void emit( Emitter emitter, int index, float x, float y ) { 31 | ((WoolParticle)emitter.recycle( WoolParticle.class )).reset( x, y ); 32 | } 33 | }; 34 | 35 | public WoolParticle() { 36 | super(); 37 | 38 | color( ColorMath.random( 0x999999, 0xEEEEE0 ) ); 39 | 40 | acc.set( 0, -40 ); 41 | } 42 | 43 | public void reset( float x, float y ) { 44 | revive(); 45 | 46 | this.x = x; 47 | this.y = y; 48 | 49 | left = lifespan = Random.Float( 0.6f, 1f ); 50 | size = 5; 51 | 52 | speed.set( Random.Float( -10, +10 ), Random.Float( -10, +10 ) ); 53 | } 54 | } -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/KindofMisc.java: -------------------------------------------------------------------------------- 1 | package com.shatteredpixel.shatteredpixeldungeon.items; 2 | 3 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 4 | import com.shatteredpixel.shatteredpixeldungeon.items.EquipableItem; 5 | 6 | /** 7 | * Created by Evan on 24/08/2014. 8 | */ 9 | public abstract class KindofMisc extends EquipableItem { 10 | 11 | public abstract void activate(Char ch); 12 | } 13 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClothArmor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.armor; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 21 | 22 | 23 | public class ClothArmor extends Armor { 24 | 25 | { 26 | name = "cloth armor"; 27 | image = ItemSpriteSheet.ARMOR_CLOTH; 28 | 29 | bones = false; //Finding them in bones would be semi-frequent and disappointing. 30 | } 31 | 32 | public ClothArmor() { 33 | super( 1 ); 34 | } 35 | 36 | @Override 37 | public String desc() { 38 | return "This lightweight armor offers basic protection."; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/armor/LeatherArmor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.armor; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 21 | 22 | 23 | public class LeatherArmor extends Armor { 24 | 25 | { 26 | name = "leather armor"; 27 | image = ItemSpriteSheet.ARMOR_LEATHER; 28 | } 29 | 30 | public LeatherArmor() { 31 | super( 2 ); 32 | } 33 | 34 | @Override 35 | public String desc() { 36 | return "Armor made from tanned monster hide. Not as light as cloth armor but provides better protection."; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/armor/MailArmor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.armor; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 21 | 22 | 23 | public class MailArmor extends Armor { 24 | 25 | { 26 | name = "mail armor"; 27 | image = ItemSpriteSheet.ARMOR_MAIL; 28 | } 29 | 30 | public MailArmor() { 31 | super( 3 ); 32 | } 33 | 34 | @Override 35 | public String desc() { 36 | return 37 | "Interlocking metal links make for a tough but flexible suit of armor."; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/armor/PlateArmor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.armor; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 21 | 22 | 23 | public class PlateArmor extends Armor { 24 | 25 | { 26 | name = "plate armor"; 27 | image = ItemSpriteSheet.ARMOR_PLATE; 28 | } 29 | 30 | public PlateArmor() { 31 | super( 5 ); 32 | } 33 | 34 | @Override 35 | public String desc() { 36 | return 37 | "Enormous plates of metal are joined together into a suit that provides " + 38 | "unmatched protection to any adventurer strong enough to bear its staggering weight."; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/armor/ScaleArmor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.armor; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 21 | 22 | 23 | public class ScaleArmor extends Armor { 24 | 25 | { 26 | name = "scale armor"; 27 | image = ItemSpriteSheet.ARMOR_SCALE; 28 | } 29 | 30 | public ScaleArmor() { 31 | super( 4 ); 32 | } 33 | 34 | @Override 35 | public String desc() { 36 | return 37 | "The metal scales sewn onto a leather vest create a flexible, yet protective armor."; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/bags/ScrollHolder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.bags; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.items.Item; 21 | import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll; 22 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 23 | 24 | public class ScrollHolder extends Bag { 25 | 26 | { 27 | name = "scroll holder"; 28 | image = ItemSpriteSheet.HOLDER; 29 | 30 | size = 12; 31 | } 32 | 33 | @Override 34 | public boolean grab( Item item ) { 35 | return item instanceof Scroll; 36 | } 37 | 38 | @Override 39 | public int price() { 40 | return 50; 41 | } 42 | 43 | @Override 44 | public String info() { 45 | return 46 | "You can place any number of scrolls into this tubular container. " + 47 | "It saves room in your backpack and protects scrolls from fire."; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/bags/SeedPouch.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.bags; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.items.Item; 21 | import com.shatteredpixel.shatteredpixeldungeon.plants.Plant; 22 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 23 | 24 | public class SeedPouch extends Bag { 25 | 26 | { 27 | name = "seed pouch"; 28 | image = ItemSpriteSheet.POUCH; 29 | 30 | size = 12; 31 | } 32 | 33 | @Override 34 | public boolean grab( Item item ) { 35 | return item instanceof Plant.Seed; 36 | } 37 | 38 | @Override 39 | public int price() { 40 | return 50; 41 | } 42 | 43 | @Override 44 | public String info() { 45 | return 46 | "This small velvet pouch allows you to store any number of seeds in it. Very convenient."; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/food/ChargrilledMeat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.food; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger; 21 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 22 | 23 | public class ChargrilledMeat extends Food { 24 | 25 | { 26 | name = "chargrilled meat"; 27 | image = ItemSpriteSheet.STEAK; 28 | energy = Hunger.STARVING - Hunger.HUNGRY; 29 | hornValue = 1; 30 | } 31 | 32 | @Override 33 | public String info() { 34 | return "It looks like a decent steak."; 35 | } 36 | 37 | @Override 38 | public int price() { 39 | return 5 * quantity; 40 | } 41 | 42 | public static Food cook( MysteryMeat ingredient ) { 43 | ChargrilledMeat result = new ChargrilledMeat(); 44 | result.quantity = ingredient.quantity(); 45 | return result; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/food/OverpricedRation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.food; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger; 21 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 22 | 23 | public class OverpricedRation extends Food { 24 | 25 | { 26 | name = "overpriced food ration"; 27 | image = ItemSpriteSheet.OVERPRICED; 28 | energy = Hunger.STARVING - Hunger.HUNGRY; 29 | message = "That food tasted ok."; 30 | hornValue = 1; 31 | } 32 | 33 | @Override 34 | public String info() { 35 | return "It looks exactly like a standard ration of food but smaller."; 36 | } 37 | 38 | @Override 39 | public int price() { 40 | return 20 * quantity; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/food/Pasty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.food; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger; 21 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 22 | 23 | public class Pasty extends Food { 24 | 25 | { 26 | name = "pasty"; 27 | image = ItemSpriteSheet.PASTY; 28 | energy = Hunger.STARVING; 29 | hornValue = 5; 30 | 31 | bones = true; 32 | } 33 | 34 | @Override 35 | public String info() { 36 | return "This is authentic Cornish pasty with traditional filling of beef and potato."; 37 | } 38 | 39 | @Override 40 | public int price() { 41 | return 20 * quantity; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/keys/GoldenKey.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.keys; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 21 | 22 | public class GoldenKey extends Key { 23 | 24 | { 25 | name = "golden key"; 26 | image = ItemSpriteSheet.GOLDEN_KEY; 27 | } 28 | 29 | public GoldenKey() { 30 | this( 0 ); 31 | } 32 | 33 | public GoldenKey( int depth ) { 34 | super(); 35 | this.depth = depth; 36 | } 37 | 38 | @Override 39 | public String info() { 40 | return 41 | "The notches on this golden key are tiny and intricate. " + 42 | "Maybe it can open some chest lock?"; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/keys/SkeletonKey.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.keys; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.items.Item; 21 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 22 | 23 | public class SkeletonKey extends Key { 24 | 25 | { 26 | name = "skeleton key"; 27 | image = ItemSpriteSheet.SKELETON_KEY; 28 | stackable = false; 29 | } 30 | 31 | public SkeletonKey() { 32 | this( 0 ); 33 | } 34 | 35 | public SkeletonKey( int depth ) { 36 | super(); 37 | this.depth = depth; 38 | } 39 | 40 | @Override 41 | public boolean isSimilar( Item item ) { 42 | return false; 43 | } 44 | 45 | @Override 46 | public String info() { 47 | return 48 | "This key looks serious: its head is shaped like a skull. Probably it can open some serious door."; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfExperience.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.potions; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; 21 | 22 | public class PotionOfExperience extends Potion { 23 | 24 | { 25 | name = "Potion of Experience"; 26 | 27 | bones = true; 28 | } 29 | 30 | @Override 31 | public void apply( Hero hero ) { 32 | setKnown(); 33 | hero.earnExp( hero.maxExp() - hero.exp ); 34 | } 35 | 36 | @Override 37 | public String desc() { 38 | return 39 | "The storied experiences of multitudes of battles reduced to liquid form, " + 40 | "this draught will instantly raise your experience level."; 41 | } 42 | 43 | @Override 44 | public int price() { 45 | return isKnown() ? 80 * quantity : super.price(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/quest/CorpseDust.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.quest; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.items.Item; 21 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 22 | 23 | public class CorpseDust extends Item { 24 | 25 | { 26 | name = "corpse dust"; 27 | image = ItemSpriteSheet.DUST; 28 | 29 | cursed = true; 30 | cursedKnown = true; 31 | 32 | unique = true; 33 | } 34 | 35 | @Override 36 | public boolean isUpgradable() { 37 | return false; 38 | } 39 | 40 | @Override 41 | public boolean isIdentified() { 42 | return true; 43 | } 44 | 45 | @Override 46 | public String info() { 47 | return 48 | "The ball of corpse dust doesn't differ outwardly from a regular dust ball. However, " + 49 | "you know somehow that it's better to get rid of it as soon as possible."; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/quest/DarkGold.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.quest; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.items.Item; 21 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 22 | 23 | public class DarkGold extends Item { 24 | 25 | { 26 | name = "dark gold ore"; 27 | image = ItemSpriteSheet.ORE; 28 | 29 | stackable = true; 30 | unique = true; 31 | } 32 | 33 | @Override 34 | public boolean isUpgradable() { 35 | return false; 36 | } 37 | 38 | @Override 39 | public boolean isIdentified() { 40 | return true; 41 | } 42 | 43 | @Override 44 | public String info() { 45 | return 46 | "This metal is called dark not because of its color (it doesn't differ from the normal gold), " + 47 | "but because it melts under the daylight, making it useless on the surface."; 48 | } 49 | 50 | @Override 51 | public int price() { 52 | return quantity; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/quest/DwarfToken.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.quest; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.items.Item; 21 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 22 | 23 | public class DwarfToken extends Item { 24 | 25 | { 26 | name = "dwarf token"; 27 | image = ItemSpriteSheet.TOKEN; 28 | 29 | stackable = true; 30 | unique = true; 31 | } 32 | 33 | @Override 34 | public boolean isUpgradable() { 35 | return false; 36 | } 37 | 38 | @Override 39 | public boolean isIdentified() { 40 | return true; 41 | } 42 | 43 | @Override 44 | public String info() { 45 | return 46 | "Many dwarves and some of their larger creations carry these small pieces of metal of unknown purpose. " + 47 | "Maybe they are jewelry or maybe some kind of ID. Dwarves are strange folk."; 48 | } 49 | 50 | @Override 51 | public int price() { 52 | return quantity * 100; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/quest/RatSkull.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.quest; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.items.Item; 21 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 22 | 23 | //this one's still hanging around to support quests from old saves 24 | //TODO: remove this when saves from v0.2.1 are no longer supported 25 | public class RatSkull extends Item { 26 | 27 | { 28 | name = "giant rat skull"; 29 | image = ItemSpriteSheet.SKULL; 30 | 31 | unique = true; 32 | } 33 | 34 | @Override 35 | public boolean isUpgradable() { 36 | return false; 37 | } 38 | 39 | @Override 40 | public boolean isIdentified() { 41 | return true; 42 | } 43 | 44 | @Override 45 | public String info() { 46 | return 47 | "It could be a nice hunting trophy, but it smells too bad to place it on a wall."; 48 | } 49 | 50 | @Override 51 | public int price() { 52 | return 100; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfAccuracy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.rings; 19 | 20 | public class RingOfAccuracy extends Ring { 21 | 22 | { 23 | name = "Ring of Accuracy"; 24 | } 25 | 26 | @Override 27 | protected RingBuff buff( ) { 28 | return new Accuracy(); 29 | } 30 | 31 | @Override 32 | public String desc() { 33 | return isKnown() ? 34 | "This ring increases your focus, reducing your enemy's ability to dodge your attacks. "+ 35 | "A degraded ring will instead make you easier to evade.": 36 | super.desc(); 37 | } 38 | 39 | public class Accuracy extends RingBuff { 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfForce.java: -------------------------------------------------------------------------------- 1 | package com.shatteredpixel.shatteredpixeldungeon.items.rings; 2 | 3 | /** 4 | * Created by debenhame on 10/09/2014. 5 | */ 6 | public class RingOfForce extends Ring { 7 | 8 | { 9 | name = "Ring of Force"; 10 | } 11 | 12 | @Override 13 | protected RingBuff buff( ) { 14 | return new Force(); 15 | } 16 | 17 | @Override 18 | public String desc() { 19 | return isKnown() ? 20 | "This ring enhances the force of the wearer's blows. " + 21 | "This extra power is largely wasted when wielding weapons, " + 22 | "but an unarmed attack will be made much stronger. " + 23 | "A degraded ring will instead weaken the wearer's blows." : 24 | super.desc(); 25 | } 26 | 27 | public class Force extends RingBuff { 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfFuror.java: -------------------------------------------------------------------------------- 1 | package com.shatteredpixel.shatteredpixeldungeon.items.rings; 2 | 3 | /** 4 | * Created by debenhame on 10/09/2014. 5 | */ 6 | public class RingOfFuror extends Ring { 7 | 8 | { 9 | name = "Ring of Furor"; 10 | } 11 | 12 | @Override 13 | protected RingBuff buff( ) { 14 | return new Furor(); 15 | } 16 | 17 | @Override 18 | public String desc() { 19 | return isKnown() ? 20 | "This ring grants the wearer an inner fury, allowing them to attack more rapidly. " + 21 | "This fury works best in large bursts, so slow weapons benefit far more than fast ones. " + 22 | "A degraded ring will instead slow the wearer's speed of attack." : 23 | super.desc(); 24 | } 25 | 26 | public class Furor extends RingBuff { 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfHaste.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.rings; 19 | 20 | public class RingOfHaste extends Ring { 21 | 22 | { 23 | name = "Ring of Haste"; 24 | } 25 | 26 | @Override 27 | protected RingBuff buff( ) { 28 | return new Haste(); 29 | } 30 | 31 | @Override 32 | public String desc() { 33 | return isKnown() ? 34 | "This ring reduces the stress of movement on the wearer, allowing them to run " + 35 | "at superhuman speeds. A degraded ring will instead weigh the wearer down.": 36 | super.desc(); 37 | } 38 | 39 | public class Haste extends RingBuff { 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfMagic.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.rings; 19 | 20 | public class RingOfMagic extends Ring { 21 | 22 | { 23 | name = "Ring of Magic"; 24 | } 25 | 26 | @Override 27 | protected RingBuff buff( ) { 28 | return new Magic(); 29 | } 30 | 31 | @Override 32 | public String desc() { 33 | return isKnown() ? 34 | "Your wands will become more powerful in the arcane field " + 35 | "that radiates from this ring. Degraded rings of magic will instead weaken your wands." : 36 | super.desc(); 37 | } 38 | 39 | public class Magic extends RingBuff { 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfMight.java: -------------------------------------------------------------------------------- 1 | package com.shatteredpixel.shatteredpixeldungeon.items.rings; 2 | 3 | 4 | /** 5 | * Created by debenhame on 10/09/2014. 6 | */ 7 | public class RingOfMight extends Ring { 8 | 9 | { 10 | name = "Ring of Might"; 11 | } 12 | 13 | @Override 14 | protected RingBuff buff( ) { 15 | return new Might(); 16 | } 17 | 18 | @Override 19 | public String desc() { 20 | return isKnown() ? 21 | "This ring enhances the physical traits of the wearer, " + 22 | "granting them greater physical strength and constitution. " + 23 | "A degraded ring will weaken the wearer." : 24 | super.desc(); 25 | } 26 | 27 | public class Might extends RingBuff { 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfSharpshooting.java: -------------------------------------------------------------------------------- 1 | package com.shatteredpixel.shatteredpixeldungeon.items.rings; 2 | 3 | /** 4 | * Created by debenhame on 10/09/2014. 5 | */ 6 | public class RingOfSharpshooting extends Ring { 7 | 8 | { 9 | name = "Ring of Sharpshooting"; 10 | } 11 | 12 | @Override 13 | protected RingBuff buff( ) { 14 | return new Aim(); 15 | } 16 | 17 | @Override 18 | public String desc() { 19 | return isKnown() ? 20 | "This ring enhances the wearer's precision and aim, which will " + 21 | "make all projectile weapons more accurate and durable. " + 22 | "A degraded ring will have the opposite effect.": 23 | super.desc(); 24 | } 25 | 26 | public class Aim extends RingBuff { 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfTenacity.java: -------------------------------------------------------------------------------- 1 | package com.shatteredpixel.shatteredpixeldungeon.items.rings; 2 | 3 | /** 4 | * Created by debenhame on 10/09/2014. 5 | */ 6 | public class RingOfTenacity extends Ring { 7 | 8 | { 9 | name = "Ring of Tenacity"; 10 | } 11 | 12 | @Override 13 | protected RingBuff buff( ) { 14 | return new Tenacity(); 15 | } 16 | 17 | @Override 18 | public String desc() { 19 | return isKnown() ? 20 | "When worn, this ring will allow the wearer to resist normally mortal strikes. " + 21 | "The more injured the user is, the more resistant they will be to damage. " + 22 | "A degraded ring will instead make it easier for enemies to execute the wearer." : 23 | super.desc(); 24 | } 25 | 26 | public class Tenacity extends RingBuff { 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfWealth.java: -------------------------------------------------------------------------------- 1 | package com.shatteredpixel.shatteredpixeldungeon.items.rings; 2 | 3 | /** 4 | * Created by debenhame on 10/09/2014. 5 | */ 6 | public class RingOfWealth extends Ring { 7 | //TODO: monitor this one as it goes, super hard to balance so you'll need some feedback. 8 | { 9 | name = "Ring of Wealth"; 10 | } 11 | 12 | @Override 13 | protected RingBuff buff( ) { 14 | return new Wealth(); 15 | } 16 | 17 | @Override 18 | public String desc() { 19 | return isKnown() ? 20 | "It's not clear what this ring does exactly, good luck may influence " + 21 | "the life an an adventurer in many subtle ways. " + 22 | "Naturally a degraded ring would give bad luck." : 23 | super.desc(); 24 | } 25 | 26 | public class Wealth extends RingBuff { 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Instability.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 21 | import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; 22 | import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon.Enchantment; 23 | import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.Boomerang; 24 | 25 | public class Instability extends Weapon.Enchantment { 26 | 27 | private static final String TXT_UNSTABLE = "Unstable %s"; 28 | 29 | @Override 30 | public boolean proc( Weapon weapon, Char attacker, Char defender, int damage ) { 31 | Enchantment ench = random(); 32 | if (weapon instanceof Boomerang) { 33 | while (ench instanceof Piercing || ench instanceof Swing) { 34 | ench = Enchantment.random(); 35 | } 36 | } 37 | return ench.proc( weapon, attacker, defender, damage ); 38 | } 39 | 40 | @Override 41 | public String name( String weaponName) { 42 | return String.format( TXT_UNSTABLE, weaponName ); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/BattleAxe.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 21 | 22 | public class BattleAxe extends MeleeWeapon { 23 | 24 | { 25 | name = "battle axe"; 26 | image = ItemSpriteSheet.BATTLE_AXE; 27 | } 28 | 29 | public BattleAxe() { 30 | super( 4, 1.2f, 1f ); 31 | } 32 | 33 | @Override 34 | public String desc() { 35 | return "The enormous steel head of this battle axe puts considerable heft behind each stroke."; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dagger.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 21 | 22 | public class Dagger extends MeleeWeapon { 23 | 24 | { 25 | name = "dagger"; 26 | image = ItemSpriteSheet.DAGGER; 27 | } 28 | 29 | public Dagger() { 30 | super( 1, 1.2f, 1f ); 31 | } 32 | 33 | @Override 34 | public String desc() { 35 | return "A simple iron dagger with a well worn wooden handle."; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Glaive.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 21 | 22 | public class Glaive extends MeleeWeapon { 23 | 24 | { 25 | name = "glaive"; 26 | image = ItemSpriteSheet.GLAIVE; 27 | } 28 | 29 | public Glaive() { 30 | super( 5, 1f, 1f ); 31 | } 32 | 33 | @Override 34 | public String desc() { 35 | return "A polearm consisting of a sword blade on the end of a pole."; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Knuckles.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 21 | 22 | public class Knuckles extends MeleeWeapon { 23 | 24 | { 25 | name = "knuckleduster"; 26 | image = ItemSpriteSheet.KNUCKLEDUSTER; 27 | } 28 | 29 | public Knuckles() { 30 | super( 1, 1f, 0.5f ); 31 | } 32 | 33 | @Override 34 | public String desc() { 35 | return "A piece of iron shaped to fit around the knuckles."; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Longsword.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 21 | 22 | public class Longsword extends MeleeWeapon { 23 | 24 | { 25 | name = "longsword"; 26 | image = ItemSpriteSheet.LONG_SWORD; 27 | } 28 | 29 | public Longsword() { 30 | super( 4, 1f, 1f ); 31 | } 32 | 33 | @Override 34 | public String desc() { 35 | return "This towering blade inflicts heavy damage by investing its heft into every cut."; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Mace.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 21 | 22 | public class Mace extends MeleeWeapon { 23 | 24 | { 25 | name = "mace"; 26 | image = ItemSpriteSheet.MACE; 27 | } 28 | 29 | public Mace() { 30 | super( 3, 1f, 0.8f ); 31 | } 32 | 33 | @Override 34 | public String desc() { 35 | return "The iron head of this weapon inflicts substantial damage."; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Quarterstaff.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 21 | 22 | public class Quarterstaff extends MeleeWeapon { 23 | 24 | { 25 | name = "quarterstaff"; 26 | image = ItemSpriteSheet.QUARTERSTAFF; 27 | } 28 | 29 | public Quarterstaff() { 30 | super( 2, 1f, 1f ); 31 | } 32 | 33 | @Override 34 | public String desc() { 35 | return "A staff of hardwood, its ends are shod with iron."; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Spear.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 21 | 22 | public class Spear extends MeleeWeapon { 23 | 24 | { 25 | name = "spear"; 26 | image = ItemSpriteSheet.SPEAR; 27 | } 28 | 29 | public Spear() { 30 | super( 2, 1f, 1.5f ); 31 | } 32 | 33 | @Override 34 | public String desc() { 35 | return "A slender wooden rod tipped with sharpened iron."; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sword.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 21 | 22 | public class Sword extends MeleeWeapon { 23 | 24 | { 25 | name = "sword"; 26 | image = ItemSpriteSheet.SWORD; 27 | } 28 | 29 | public Sword() { 30 | super( 3, 1f, 1f ); 31 | } 32 | 33 | @Override 34 | public String desc() { 35 | return "The razor-sharp length of steel blade shines reassuringly."; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WarHammer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 21 | 22 | public class WarHammer extends MeleeWeapon { 23 | 24 | { 25 | name = "war hammer"; 26 | image = ItemSpriteSheet.WAR_HAMMER; 27 | } 28 | 29 | public WarHammer() { 30 | super( 5, 1.2f, 1f ); 31 | } 32 | 33 | @Override 34 | public String desc() { 35 | return 36 | "Few creatures can withstand the crushing blow of this towering mass of lead and steel, " + 37 | "but only the strongest of adventurers can use it effectively."; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Dart.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.items.Item; 21 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 22 | import com.watabou.utils.Random; 23 | 24 | public class Dart extends MissileWeapon { 25 | 26 | { 27 | name = "dart"; 28 | image = ItemSpriteSheet.DART; 29 | 30 | MIN = 1; 31 | MAX = 4; 32 | 33 | bones = false; //Finding them in bones would be semi-frequent and disappointing. 34 | } 35 | 36 | public Dart() { 37 | this( 1 ); 38 | } 39 | 40 | public Dart( int number ) { 41 | super(); 42 | quantity = number; 43 | } 44 | 45 | @Override 46 | public String desc() { 47 | return 48 | "These simple metal spikes are weighted to fly true and " + 49 | "sting their prey with a flick of the wrist."; 50 | } 51 | 52 | @Override 53 | public Item random() { 54 | quantity = Random.Int( 5, 15 ); 55 | return this; 56 | } 57 | 58 | @Override 59 | public int price() { 60 | return quantity * 2; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/levels/features/Door.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.levels.features; 19 | 20 | import com.watabou.noosa.audio.Sample; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | import com.shatteredpixel.shatteredpixeldungeon.Dungeon; 23 | import com.shatteredpixel.shatteredpixeldungeon.levels.Level; 24 | import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; 25 | import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; 26 | 27 | public class Door { 28 | 29 | public static void enter( int pos ) { 30 | Level.set( pos, Terrain.OPEN_DOOR ); 31 | GameScene.updateMap( pos ); 32 | Dungeon.observe(); 33 | 34 | if (Dungeon.visible[pos]) { 35 | Sample.INSTANCE.play( Assets.SND_OPEN ); 36 | } 37 | } 38 | 39 | public static void leave( int pos ) { 40 | if (Dungeon.level.heaps.get( pos ) == null) { 41 | Level.set( pos, Terrain.DOOR ); 42 | GameScene.updateMap( pos ); 43 | Dungeon.observe(); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/BossExitPainter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.levels.painters; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.levels.Level; 21 | import com.shatteredpixel.shatteredpixeldungeon.levels.Room; 22 | import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; 23 | 24 | public class BossExitPainter extends Painter { 25 | 26 | public static void paint( Level level, Room room ) { 27 | 28 | fill( level, room, Terrain.WALL ); 29 | fill( level, room, 1, Terrain.EMPTY ); 30 | 31 | for (Room.Door door : room.connected.values()) { 32 | door.set( Room.Door.Type.REGULAR ); 33 | } 34 | 35 | level.exit = room.top * Level.WIDTH + (room.left + room.right) / 2; 36 | set( level, level.exit, Terrain.LOCKED_EXIT ); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/EntrancePainter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.levels.painters; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.levels.Level; 21 | import com.shatteredpixel.shatteredpixeldungeon.levels.Room; 22 | import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; 23 | 24 | public class EntrancePainter extends Painter { 25 | 26 | public static void paint( Level level, Room room ) { 27 | 28 | fill( level, room, Terrain.WALL ); 29 | fill( level, room, 1, Terrain.EMPTY ); 30 | 31 | for (Room.Door door : room.connected.values()) { 32 | door.set( Room.Door.Type.REGULAR ); 33 | } 34 | 35 | level.entrance = room.random( 1 ); 36 | set( level, level.entrance, Terrain.ENTRANCE ); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/ExitPainter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.levels.painters; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.levels.Level; 21 | import com.shatteredpixel.shatteredpixeldungeon.levels.Room; 22 | import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; 23 | 24 | public class ExitPainter extends Painter { 25 | 26 | public static void paint( Level level, Room room ) { 27 | 28 | fill( level, room, Terrain.WALL ); 29 | fill( level, room, 1, Terrain.EMPTY ); 30 | 31 | for (Room.Door door : room.connected.values()) { 32 | door.set( Room.Door.Type.REGULAR ); 33 | } 34 | 35 | level.exit = room.random( 1 ); 36 | set( level, level.exit, Terrain.EXIT ); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/FireTrap.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.levels.traps; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 21 | import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob; 22 | import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire; 23 | import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; 24 | import com.shatteredpixel.shatteredpixeldungeon.effects.particles.FlameParticle; 25 | import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; 26 | 27 | public class FireTrap { 28 | 29 | // 0xFF7708 30 | 31 | public static void trigger( int pos, Char ch ) { 32 | 33 | GameScene.add( Blob.seed( pos, 2, Fire.class ) ); 34 | CellEmitter.get( pos ).burst( FlameParticle.FACTORY, 5 ); 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GrippingTrap.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.levels.traps; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.Dungeon; 21 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 22 | import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding; 23 | import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; 24 | import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple; 25 | import com.shatteredpixel.shatteredpixeldungeon.effects.Wound; 26 | import com.watabou.utils.Random; 27 | 28 | public class GrippingTrap { 29 | 30 | public static void trigger( int pos, Char c ) { 31 | 32 | if (c != null) { 33 | int damage = Math.max( 0, (Dungeon.depth + 3) - Random.IntRange( 0, c.dr() / 2 ) ); 34 | Buff.affect( c, Bleeding.class ).set( damage ); 35 | Buff.prolong( c, Cripple.class, Cripple.DURATION ); 36 | Wound.hit( c ); 37 | } else { 38 | Wound.hit( pos ); 39 | } 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ParalyticTrap.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.levels.traps; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.Dungeon; 21 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 22 | import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob; 23 | import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ParalyticGas; 24 | import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; 25 | 26 | public class ParalyticTrap { 27 | 28 | // 0xCCCC55 29 | 30 | public static void trigger( int pos, Char ch ) { 31 | 32 | GameScene.add( Blob.seed( pos, 80 + 5 * Dungeon.depth, ParalyticGas.class ) ); 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/PoisonTrap.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.levels.traps; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.Dungeon; 21 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 22 | import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; 23 | import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison; 24 | import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; 25 | import com.shatteredpixel.shatteredpixeldungeon.effects.particles.PoisonParticle; 26 | 27 | public class PoisonTrap { 28 | 29 | // 0xBB66EE 30 | 31 | public static void trigger( int pos, Char ch ) { 32 | 33 | if (ch != null) { 34 | Buff.affect( ch, Poison.class ).set( Poison.durationFactor( ch ) * (4 + Dungeon.depth / 2) ); 35 | } 36 | 37 | CellEmitter.center( pos ).burst( PoisonParticle.SPLASH, 3 ); 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ToxicTrap.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.levels.traps; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.Dungeon; 21 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 22 | import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob; 23 | import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas; 24 | import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; 25 | 26 | public class ToxicTrap { 27 | 28 | // 0x40CC55 29 | 30 | public static void trigger( int pos, Char ch ) { 31 | 32 | GameScene.add( Blob.seed( pos, 300 + 20 * Dungeon.depth, ToxicGas.class ) ); 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/plants/BlandfruitBush.java: -------------------------------------------------------------------------------- 1 | package com.shatteredpixel.shatteredpixeldungeon.plants; 2 | 3 | import com.shatteredpixel.shatteredpixeldungeon.Dungeon; 4 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 5 | import com.shatteredpixel.shatteredpixeldungeon.items.food.Blandfruit; 6 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 7 | 8 | /** 9 | * Created by Evan on 13/08/2014. 10 | */ 11 | public class BlandfruitBush extends Plant { 12 | 13 | private static final String TXT_DESC = 14 | "Distant cousin of the Rotberry, the pear-shaped produce of the Blandfruit bush tastes like caked dust. " + 15 | "The fruit is gross and unsubstantial but isn't poisonous. perhaps it could be cooked."; 16 | 17 | { 18 | image = 8; 19 | plantName = "Blandfruit"; 20 | } 21 | 22 | @Override 23 | public void activate( Char ch ) { 24 | super.activate( ch ); 25 | 26 | Dungeon.level.drop( new Blandfruit(), pos ).sprite.drop(); 27 | } 28 | 29 | @Override 30 | public String desc() { 31 | return TXT_DESC; 32 | } 33 | 34 | public static class Seed extends Plant.Seed { 35 | { 36 | plantName = "Blandfruit"; 37 | 38 | name = "seed of " + plantName; 39 | image = ItemSpriteSheet.SEED_BLANDFRUIT; 40 | 41 | plantClass = BlandfruitBush.class; 42 | alchemyClass = null; 43 | } 44 | 45 | @Override 46 | public String desc() { 47 | return TXT_DESC; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/plants/Stormvine.java: -------------------------------------------------------------------------------- 1 | package com.shatteredpixel.shatteredpixeldungeon.plants; 2 | 3 | import com.shatteredpixel.shatteredpixeldungeon.actors.Char; 4 | import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; 5 | import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo; 6 | import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLevitation; 7 | import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 8 | 9 | /** 10 | * Created by Evan on 23/10/2014. 11 | */ 12 | public class Stormvine extends Plant { 13 | 14 | private static final String TXT_DESC = 15 | "Gravity affects the Stormvine plant strangely, allowing its whispy blue tendrils " + 16 | "to 'hang' on the air. Anything caught in the vine is affected by this, and becomes disoriented."; 17 | 18 | { 19 | image = 9; 20 | plantName = "Stormvine"; 21 | } 22 | 23 | @Override 24 | public void activate( Char ch ) { 25 | super.activate( ch ); 26 | 27 | if (ch != null) { 28 | Buff.affect(ch, Vertigo.class, Vertigo.duration( ch ) ); 29 | } 30 | } 31 | 32 | @Override 33 | public String desc() { 34 | return TXT_DESC; 35 | } 36 | 37 | public static class Seed extends Plant.Seed { 38 | { 39 | plantName = "Stormvine"; 40 | 41 | name = "seed of " + plantName; 42 | image = ItemSpriteSheet.SEED_STORMVINE; 43 | 44 | plantClass = Stormvine.class; 45 | alchemyClass = PotionOfLevitation.class; 46 | } 47 | 48 | @Override 49 | public String desc() { 50 | return TXT_DESC; 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/AcidicSprite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 19 | 20 | import com.watabou.noosa.TextureFilm; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | 23 | public class AcidicSprite extends ScorpioSprite { 24 | 25 | public AcidicSprite() { 26 | super(); 27 | 28 | texture( Assets.SCORPIO ); 29 | 30 | TextureFilm frames = new TextureFilm( texture, 18, 17 ); 31 | 32 | idle = new Animation( 12, true ); 33 | idle.frames( frames, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 16, 15, 16 ); 34 | 35 | run = new Animation( 4, true ); 36 | run.frames( frames, 19, 20 ); 37 | 38 | attack = new Animation( 15, false ); 39 | attack.frames( frames, 14, 17, 18 ); 40 | 41 | zap = attack.clone(); 42 | 43 | die = new Animation( 12, false ); 44 | die.frames( frames, 14, 21, 22, 23, 24 ); 45 | 46 | play( idle ); 47 | } 48 | 49 | @Override 50 | public int blood() { 51 | return 0xFF66FF22; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/AlbinoSprite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 19 | 20 | import com.watabou.noosa.TextureFilm; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | 23 | public class AlbinoSprite extends MobSprite { 24 | 25 | public AlbinoSprite() { 26 | super(); 27 | 28 | texture( Assets.RAT ); 29 | 30 | TextureFilm frames = new TextureFilm( texture, 16, 15 ); 31 | 32 | idle = new Animation( 2, true ); 33 | idle.frames( frames, 16, 16, 16, 17 ); 34 | 35 | run = new Animation( 10, true ); 36 | run.frames( frames, 22, 23, 24, 25, 26 ); 37 | 38 | attack = new Animation( 15, false ); 39 | attack.frames( frames, 18, 19, 20, 21 ); 40 | 41 | die = new Animation( 10, false ); 42 | die.frames( frames, 27, 28, 29, 30 ); 43 | 44 | play( idle ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/BanditSprite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 19 | 20 | import com.watabou.noosa.TextureFilm; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | 23 | public class BanditSprite extends MobSprite { 24 | 25 | public BanditSprite() { 26 | super(); 27 | 28 | texture( Assets.THIEF ); 29 | TextureFilm film = new TextureFilm( texture, 12, 13 ); 30 | 31 | idle = new Animation( 1, true ); 32 | idle.frames( film, 21, 21, 21, 22, 21, 21, 21, 21, 22 ); 33 | 34 | run = new Animation( 15, true ); 35 | run.frames( film, 21, 21, 23, 24, 24, 25 ); 36 | 37 | die = new Animation( 10, false ); 38 | die.frames( film, 25, 27, 28, 29, 30 ); 39 | 40 | attack = new Animation( 12, false ); 41 | attack.frames( film, 31, 32, 33 ); 42 | 43 | idle(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/BatSprite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 19 | 20 | import com.watabou.noosa.TextureFilm; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | 23 | public class BatSprite extends MobSprite { 24 | 25 | public BatSprite() { 26 | super(); 27 | 28 | texture( Assets.BAT ); 29 | 30 | TextureFilm frames = new TextureFilm( texture, 15, 15 ); 31 | 32 | idle = new Animation( 8, true ); 33 | idle.frames( frames, 0, 1 ); 34 | 35 | run = new Animation( 12, true ); 36 | run.frames( frames, 0, 1 ); 37 | 38 | attack = new Animation( 12, false ); 39 | attack.frames( frames, 2, 3, 0, 1 ); 40 | 41 | die = new Animation( 12, false ); 42 | die.frames( frames, 4, 5, 6 ); 43 | 44 | play( idle ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/BruteSprite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 19 | 20 | import com.watabou.noosa.TextureFilm; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | 23 | public class BruteSprite extends MobSprite { 24 | 25 | public BruteSprite() { 26 | super(); 27 | 28 | texture( Assets.BRUTE ); 29 | 30 | TextureFilm frames = new TextureFilm( texture, 12, 16 ); 31 | 32 | idle = new Animation( 2, true ); 33 | idle.frames( frames, 0, 0, 0, 1, 0, 0, 1, 1 ); 34 | 35 | run = new Animation( 12, true ); 36 | run.frames( frames, 4, 5, 6, 7 ); 37 | 38 | attack = new Animation( 12, false ); 39 | attack.frames( frames, 2, 3, 0 ); 40 | 41 | die = new Animation( 12, false ); 42 | die.frames( frames, 8, 9, 10 ); 43 | 44 | play( idle ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/CrabSprite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 19 | 20 | import com.watabou.noosa.TextureFilm; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | 23 | public class CrabSprite extends MobSprite { 24 | 25 | public CrabSprite() { 26 | super(); 27 | 28 | texture( Assets.CRAB ); 29 | 30 | TextureFilm frames = new TextureFilm( texture, 16, 16 ); 31 | 32 | idle = new Animation( 5, true ); 33 | idle.frames( frames, 0, 1, 0, 2 ); 34 | 35 | run = new Animation( 15, true ); 36 | run.frames( frames, 3, 4, 5, 6 ); 37 | 38 | attack = new Animation( 12, false ); 39 | attack.frames( frames, 7, 8, 9 ); 40 | 41 | die = new Animation( 12, false ); 42 | die.frames( frames, 10, 11, 12, 13 ); 43 | 44 | play( idle ); 45 | } 46 | 47 | @Override 48 | public int blood() { 49 | return 0xFFFFEA80; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/DiscardedItemSprite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 19 | 20 | import com.watabou.noosa.Game; 21 | 22 | public class DiscardedItemSprite extends ItemSprite { 23 | 24 | public DiscardedItemSprite() { 25 | 26 | super(); 27 | 28 | originToCenter(); 29 | angularSpeed = 720; 30 | } 31 | 32 | @Override 33 | public void drop() { 34 | scale.set( 1 ); 35 | am = 1; 36 | } 37 | 38 | @Override 39 | public void update() { 40 | 41 | super.update(); 42 | 43 | scale.set( scale.x * 0.9f ); 44 | if ((am -= Game.elapsed) <= 0) { 45 | remove(); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/GnollSprite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 19 | 20 | import com.watabou.noosa.TextureFilm; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | 23 | public class GnollSprite extends MobSprite { 24 | 25 | public GnollSprite() { 26 | super(); 27 | 28 | texture( Assets.GNOLL ); 29 | 30 | TextureFilm frames = new TextureFilm( texture, 12, 15 ); 31 | 32 | idle = new Animation( 2, true ); 33 | idle.frames( frames, 0, 0, 0, 1, 0, 0, 1, 1 ); 34 | 35 | run = new Animation( 12, true ); 36 | run.frames( frames, 4, 5, 6, 7 ); 37 | 38 | attack = new Animation( 12, false ); 39 | attack.frames( frames, 2, 3, 0 ); 40 | 41 | die = new Animation( 12, false ); 42 | die.frames( frames, 8, 9, 10 ); 43 | 44 | play( idle ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/GreatCrabSprite.java: -------------------------------------------------------------------------------- 1 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 2 | 3 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 4 | import com.watabou.noosa.MovieClip; 5 | import com.watabou.noosa.TextureFilm; 6 | 7 | /** 8 | * Created by Evan on 09/10/2014. 9 | */ 10 | public class GreatCrabSprite extends MobSprite { 11 | 12 | public GreatCrabSprite() { 13 | super(); 14 | 15 | texture( Assets.CRAB ); 16 | 17 | TextureFilm frames = new TextureFilm( texture, 16, 16 ); 18 | 19 | idle = new MovieClip.Animation( 5, true ); 20 | idle.frames( frames, 16, 17, 16, 18 ); 21 | 22 | run = new MovieClip.Animation( 10, true ); 23 | run.frames( frames, 19, 20, 21, 22 ); 24 | 25 | attack = new MovieClip.Animation( 12, false ); 26 | attack.frames( frames, 23, 24, 25 ); 27 | 28 | die = new MovieClip.Animation( 12, false ); 29 | die.frames( frames, 26, 27, 28, 29 ); 30 | 31 | play( idle ); 32 | } 33 | 34 | @Override 35 | public int blood() { 36 | return 0xFFFFEA80; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/KingSprite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 19 | 20 | import com.watabou.noosa.TextureFilm; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | 23 | public class KingSprite extends MobSprite { 24 | 25 | public KingSprite() { 26 | super(); 27 | 28 | texture( Assets.KING ); 29 | 30 | TextureFilm frames = new TextureFilm( texture, 16, 16 ); 31 | 32 | idle = new Animation( 12, true ); 33 | idle.frames( frames, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2 ); 34 | 35 | run = new Animation( 15, true ); 36 | run.frames( frames, 3, 4, 5, 6, 7, 8 ); 37 | 38 | attack = new Animation( 15, false ); 39 | attack.frames( frames, 9, 10, 11 ); 40 | 41 | die = new Animation( 8, false ); 42 | die.frames( frames, 12, 13, 14, 15 ); 43 | 44 | play( idle ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/LarvaSprite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 19 | 20 | import com.watabou.noosa.TextureFilm; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | import com.shatteredpixel.shatteredpixeldungeon.effects.Splash; 23 | 24 | public class LarvaSprite extends MobSprite { 25 | 26 | public LarvaSprite() { 27 | super(); 28 | 29 | texture( Assets.LARVA ); 30 | 31 | TextureFilm frames = new TextureFilm( texture, 12, 8 ); 32 | 33 | idle = new Animation( 5, true ); 34 | idle.frames( frames, 4, 4, 4, 4, 4, 5, 5 ); 35 | 36 | run = new Animation( 12, true ); 37 | run.frames( frames, 0, 1, 2, 3 ); 38 | 39 | attack = new Animation( 15, false ); 40 | attack.frames( frames, 6, 5, 7 ); 41 | 42 | die = new Animation( 10, false ); 43 | die.frames( frames, 8 ); 44 | 45 | play( idle ); 46 | } 47 | 48 | @Override 49 | public int blood() { 50 | return 0xbbcc66; 51 | } 52 | 53 | @Override 54 | public void die() { 55 | Splash.at( center(), blood(), 10 ); 56 | super.die(); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/PiranhaSprite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 19 | 20 | import com.watabou.noosa.TextureFilm; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; 23 | 24 | public class PiranhaSprite extends MobSprite { 25 | 26 | public PiranhaSprite() { 27 | super(); 28 | 29 | texture( Assets.PIRANHA ); 30 | 31 | TextureFilm frames = new TextureFilm( texture, 12, 16 ); 32 | 33 | idle = new Animation( 8, true ); 34 | idle.frames( frames, 0, 1, 2, 1 ); 35 | 36 | run = new Animation( 20, true ); 37 | run.frames( frames, 0, 1, 2, 1 ); 38 | 39 | attack = new Animation( 20, false ); 40 | attack.frames( frames, 3, 4, 5, 6, 7, 8, 9, 10, 11 ); 41 | 42 | die = new Animation( 4, false ); 43 | die.frames( frames, 12, 13, 14 ); 44 | 45 | play( idle ); 46 | } 47 | 48 | @Override 49 | public void onComplete( Animation anim ) { 50 | super.onComplete( anim ); 51 | 52 | if (anim == attack) { 53 | GameScene.ripple( ch.pos ); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/RatSprite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 19 | 20 | import com.watabou.noosa.TextureFilm; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | 23 | public class RatSprite extends MobSprite { 24 | 25 | public RatSprite() { 26 | super(); 27 | 28 | texture( Assets.RAT ); 29 | 30 | TextureFilm frames = new TextureFilm( texture, 16, 15 ); 31 | 32 | idle = new Animation( 2, true ); 33 | idle.frames( frames, 0, 0, 0, 1 ); 34 | 35 | run = new Animation( 10, true ); 36 | run.frames( frames, 6, 7, 8, 9, 10 ); 37 | 38 | attack = new Animation( 15, false ); 39 | attack.frames( frames, 2, 3, 4, 5, 0 ); 40 | 41 | die = new Animation( 10, false ); 42 | die.frames( frames, 11, 12, 13, 14 ); 43 | 44 | play( idle ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/SheepSprite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 19 | 20 | import com.watabou.noosa.TextureFilm; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | import com.watabou.utils.Random; 23 | 24 | public class SheepSprite extends MobSprite { 25 | 26 | public SheepSprite() { 27 | super(); 28 | 29 | texture( Assets.SHEEP ); 30 | 31 | TextureFilm frames = new TextureFilm( texture, 16, 15 ); 32 | 33 | idle = new Animation( 8, true ); 34 | idle.frames( frames, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0 ); 35 | 36 | run = idle.clone(); 37 | attack = idle.clone(); 38 | 39 | die = new Animation( 20, false ); 40 | die.frames( frames, 0 ); 41 | 42 | play( idle ); 43 | curFrame = Random.Int( curAnim.frames.length ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/ShieldedSprite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 19 | 20 | import com.watabou.noosa.TextureFilm; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | 23 | public class ShieldedSprite extends MobSprite { 24 | 25 | public ShieldedSprite() { 26 | super(); 27 | 28 | texture( Assets.BRUTE ); 29 | 30 | TextureFilm frames = new TextureFilm( texture, 12, 16 ); 31 | 32 | idle = new Animation( 2, true ); 33 | idle.frames( frames, 21, 21, 21, 22, 21, 21, 22, 22 ); 34 | 35 | run = new Animation( 12, true ); 36 | run.frames( frames, 25, 26, 27, 28 ); 37 | 38 | attack = new Animation( 12, false ); 39 | attack.frames( frames, 23, 24 ); 40 | 41 | die = new Animation( 12, false ); 42 | die.frames( frames, 29, 30, 31 ); 43 | 44 | play( idle ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/SpinnerSprite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 19 | 20 | import com.watabou.noosa.TextureFilm; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | 23 | public class SpinnerSprite extends MobSprite { 24 | 25 | public SpinnerSprite() { 26 | super(); 27 | 28 | texture( Assets.SPINNER ); 29 | 30 | TextureFilm frames = new TextureFilm( texture, 16, 16 ); 31 | 32 | idle = new Animation( 10, true ); 33 | idle.frames( frames, 0, 0, 0, 0, 0, 1, 0, 1 ); 34 | 35 | run = new Animation( 15, true ); 36 | run.frames( frames, 0, 2, 0, 3 ); 37 | 38 | attack = new Animation( 12, false ); 39 | attack.frames( frames, 0, 4, 5, 0 ); 40 | 41 | die = new Animation( 12, false ); 42 | die.frames( frames, 6, 7, 8, 9 ); 43 | 44 | play( idle ); 45 | } 46 | 47 | @Override 48 | public int blood() { 49 | return 0xFFBFE5B8; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/StatueSprite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 19 | 20 | import com.watabou.noosa.TextureFilm; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | 23 | public class StatueSprite extends MobSprite { 24 | 25 | public StatueSprite() { 26 | super(); 27 | 28 | texture( Assets.STATUE ); 29 | 30 | TextureFilm frames = new TextureFilm( texture, 12, 15 ); 31 | 32 | idle = new Animation( 2, true ); 33 | idle.frames( frames, 0, 0, 0, 0, 0, 1, 1 ); 34 | 35 | run = new Animation( 15, true ); 36 | run.frames( frames, 2, 3, 4, 5, 6, 7 ); 37 | 38 | attack = new Animation( 12, false ); 39 | attack.frames( frames, 8, 9, 10 ); 40 | 41 | die = new Animation( 5, false ); 42 | die.frames( frames, 11, 12, 13, 14, 15, 15 ); 43 | 44 | play( idle ); 45 | } 46 | 47 | @Override 48 | public int blood() { 49 | return 0xFFcdcdb7; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/SwarmSprite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 19 | 20 | import com.watabou.noosa.TextureFilm; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | 23 | public class SwarmSprite extends MobSprite { 24 | 25 | public SwarmSprite() { 26 | super(); 27 | 28 | texture( Assets.SWARM ); 29 | 30 | TextureFilm frames = new TextureFilm( texture, 16, 16 ); 31 | 32 | idle = new Animation( 15, true ); 33 | idle.frames( frames, 0, 1, 2, 3, 4, 5 ); 34 | 35 | run = new Animation( 15, true ); 36 | run.frames( frames, 0, 1, 2, 3, 4, 5 ); 37 | 38 | attack = new Animation( 20, false ); 39 | attack.frames( frames, 6, 7, 8, 9 ); 40 | 41 | die = new Animation( 15, false ); 42 | die.frames( frames, 10, 11, 12, 13, 14 ); 43 | 44 | play( idle ); 45 | } 46 | 47 | @Override 48 | public int blood() { 49 | return 0xFF8BA077; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/ThiefSprite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 19 | 20 | import com.watabou.noosa.TextureFilm; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | 23 | public class ThiefSprite extends MobSprite { 24 | 25 | public ThiefSprite() { 26 | super(); 27 | 28 | texture( Assets.THIEF ); 29 | TextureFilm film = new TextureFilm( texture, 12, 13 ); 30 | 31 | idle = new Animation( 1, true ); 32 | idle.frames( film, 0, 0, 0, 1, 0, 0, 0, 0, 1 ); 33 | 34 | run = new Animation( 15, true ); 35 | run.frames( film, 0, 0, 2, 3, 3, 4 ); 36 | 37 | die = new Animation( 10, false ); 38 | die.frames( film, 5, 6, 7, 8, 9 ); 39 | 40 | attack = new Animation( 12, false ); 41 | attack.frames( film, 10, 11, 12, 0 ); 42 | 43 | idle(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/WraithSprite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 19 | 20 | import com.watabou.noosa.TextureFilm; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | 23 | public class WraithSprite extends MobSprite { 24 | 25 | public WraithSprite() { 26 | super(); 27 | 28 | texture( Assets.WRAITH ); 29 | 30 | TextureFilm frames = new TextureFilm( texture, 14, 15 ); 31 | 32 | idle = new Animation( 5, true ); 33 | idle.frames( frames, 0, 1 ); 34 | 35 | run = new Animation( 10, true ); 36 | run.frames( frames, 0, 1 ); 37 | 38 | attack = new Animation( 10, false ); 39 | attack.frames( frames, 0, 2, 3 ); 40 | 41 | die = new Animation( 8, false ); 42 | die.frames( frames, 0, 4, 5, 6, 7 ); 43 | 44 | play( idle ); 45 | } 46 | 47 | @Override 48 | public int blood() { 49 | return 0x88000000; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/sprites/YogSprite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.sprites; 19 | 20 | import com.watabou.noosa.TextureFilm; 21 | import com.shatteredpixel.shatteredpixeldungeon.Assets; 22 | import com.shatteredpixel.shatteredpixeldungeon.effects.Splash; 23 | 24 | public class YogSprite extends MobSprite { 25 | 26 | public YogSprite() { 27 | super(); 28 | 29 | texture( Assets.YOG ); 30 | 31 | TextureFilm frames = new TextureFilm( texture, 20, 19 ); 32 | 33 | idle = new Animation( 10, true ); 34 | idle.frames( frames, 0, 1, 2, 2, 1, 0, 3, 4, 4, 3, 0, 5, 6, 6, 5 ); 35 | 36 | run = new Animation( 12, true ); 37 | run.frames( frames, 0 ); 38 | 39 | attack = new Animation( 12, false ); 40 | attack.frames( frames, 0 ); 41 | 42 | die = new Animation( 10, false ); 43 | die.frames( frames, 0, 7, 8, 9 ); 44 | 45 | play( idle ); 46 | } 47 | 48 | @Override 49 | public void die() { 50 | super.die(); 51 | 52 | Splash.at( center(), blood(), 12 ); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/ui/BusyIndicator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.ui; 19 | 20 | import com.watabou.noosa.Image; 21 | import com.shatteredpixel.shatteredpixeldungeon.Dungeon; 22 | 23 | public class BusyIndicator extends Image { 24 | 25 | public BusyIndicator() { 26 | super(); 27 | copy( Icons.BUSY.get() ); 28 | 29 | origin.set( width / 2, height / 2 ); 30 | angularSpeed = 720; 31 | } 32 | 33 | @Override 34 | public void update() { 35 | super.update(); 36 | visible = Dungeon.hero.isAlive() && !Dungeon.hero.ready; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/ui/ResumeIndicator.java: -------------------------------------------------------------------------------- 1 | package com.shatteredpixel.shatteredpixeldungeon.ui; 2 | 3 | import com.shatteredpixel.shatteredpixeldungeon.Dungeon; 4 | import com.watabou.noosa.Image; 5 | 6 | /** 7 | * Created by Evan on 21/01/2015. 8 | */ 9 | public class ResumeIndicator extends Tag { 10 | 11 | private Image icon; 12 | 13 | public ResumeIndicator() { 14 | super(0xCDD5C0); 15 | 16 | setSize( 24, 22 ); 17 | 18 | visible = false; 19 | 20 | } 21 | 22 | @Override 23 | protected void createChildren() { 24 | super.createChildren(); 25 | icon = Icons.get(Icons.RESUME); 26 | add(icon); 27 | } 28 | 29 | @Override 30 | protected void layout() { 31 | super.layout(); 32 | icon.x = x + (width - icon.width()) / 2; 33 | icon.y = y + (height - icon.height()) / 2; 34 | } 35 | 36 | @Override 37 | protected void onClick() { 38 | Dungeon.hero.resume(); 39 | } 40 | 41 | @Override 42 | public void update() { 43 | if (!Dungeon.hero.isAlive()) 44 | visible = false; 45 | else if (visible != (Dungeon.hero.lastAction != null)){ 46 | visible = Dungeon.hero.lastAction != null; 47 | if (visible) 48 | flash(); 49 | } 50 | super.update(); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/utils/Utils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.utils; 19 | 20 | import java.util.Locale; 21 | 22 | public class Utils { 23 | 24 | public static String capitalize( String str ) { 25 | return Character.toUpperCase( str.charAt( 0 ) ) + str.substring( 1 ); 26 | } 27 | 28 | public static String format( String format, Object...args ) { 29 | return String.format( Locale.ENGLISH, format, args ); 30 | } 31 | 32 | public static String VOWELS = "aoeiu"; 33 | 34 | public static String indefinite( String noun ) { 35 | if (noun.length() == 0) { 36 | return "a"; 37 | } else { 38 | return (VOWELS.indexOf( Character.toLowerCase( noun.charAt( 0 ) ) ) != -1 ? "an " : "a ") + noun; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/windows/WndError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.windows; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.ui.Icons; 21 | 22 | public class WndError extends WndTitledMessage { 23 | 24 | private static final String TXT_TITLE = "ERROR"; 25 | 26 | public WndError( String message ) { 27 | super( Icons.WARNING.get(), TXT_TITLE, message ); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/windows/WndMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.windows; 19 | 20 | import com.watabou.noosa.BitmapTextMultiline; 21 | import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; 22 | import com.shatteredpixel.shatteredpixeldungeon.ui.Window; 23 | 24 | public class WndMessage extends Window { 25 | 26 | private static final int WIDTH = 120; 27 | private static final int MARGIN = 4; 28 | 29 | public WndMessage( String text ) { 30 | 31 | super(); 32 | 33 | BitmapTextMultiline info = PixelScene.createMultiline( text, 6 ); 34 | info.maxWidth = WIDTH - MARGIN * 2; 35 | info.measure(); 36 | info.x = info.y = MARGIN; 37 | add( info ); 38 | 39 | resize( 40 | (int)info.width() + MARGIN * 2, 41 | (int)info.height() + MARGIN * 2 ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/com/shatteredpixel/shatteredpixeldungeon/windows/WndQuest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pixel Dungeon 3 | * Copyright (C) 2012-2014 Oleg Dolya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see 17 | */ 18 | package com.shatteredpixel.shatteredpixeldungeon.windows; 19 | 20 | import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.NPC; 21 | import com.shatteredpixel.shatteredpixeldungeon.utils.Utils; 22 | 23 | public class WndQuest extends WndTitledMessage { 24 | 25 | public WndQuest( NPC questgiver, String text ) { 26 | super( questgiver.sprite(), Utils.capitalize( questgiver.name ), text ); 27 | } 28 | } 29 | --------------------------------------------------------------------------------