From bae381547509c0291d9c7fbc4906ec546ac4e6b4 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 14 Sep 2015 00:40:22 -0400 Subject: [PATCH] v0.3.1d: added custom tiles to the weak floor room, as a hint for the pit room below --- assets/custom_tiles/weak_floor.png | Bin 0 -> 1767 bytes .../shatteredpixeldungeon/Assets.java | 2 ++ .../levels/painters/WeakFloorPainter.java | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 assets/custom_tiles/weak_floor.png diff --git a/assets/custom_tiles/weak_floor.png b/assets/custom_tiles/weak_floor.png new file mode 100644 index 0000000000000000000000000000000000000000..e00819139876ff3628d9c3c1e30a045f47d135dd GIT binary patch literal 1767 zcmVzUJ4#YLa)IcLURak~S3 z)6+AjPIY%xz4ca&01oiQv(IodLI{`{=1venLO@k%VkD^&V?==G&%dHSo_+o!94AP? z+;DXy3W8v2#3rIi2{9ld{OQj_`QQBdSGYSO!fZOh+z1i~A&@lD#1Tnbn%DrsAD_Qq zef;95KPJS0siECoLkzUbmeHe8oqzZHP1zrQ@-gN{lz_V7=135N+<*SR{{36FVF=(~ zJo}8)ru!cV0)U&>@6576|MKNG)%cq9etGHSeI>7^G_m2uSKn0QPhP#ee}|oZtS|4x zCh+3Ruj_Ze{Q2iB7t8-ne^Q=*{kMVfHMI}iP@ubj-uWTKz_$|&w zygP{G8DMXBhqJS%q_!PIe!I-;tLr)1Gq$N!RA{2`{(A?+Ci1hNe99j>2R1j5z{~3! zmTUVjs8k$iXJ?1^PL3aTn73?%dQfwwv)RDlp+q0l&$HPaH`{oTyEB{4v%y8`T;*et zzs2#*otQJ3&TxkiLY-HUoagCmjy<6N{9?j#nQ|J^oI+Om18r-ZUrcD4W>dc#xAS>6 zcnEb~N0Qsy+w3q~GMaq%J}`8N_LQumK;H>U8mM=tJ}`87UzP8E4^bek(!k30HZXK~ zx2jbX=sQ741NF1!cP-mQ)5Q9|lu|{3;_k~1x%vpyPj4bp9o)M2mgpCeK^oW^1ZZN+ zm+tw}i@{^h;O?Fc;>A%`(Gi=7n&J+cJQFC%1{YaDxF)a0j3KVPFpf}j9LLP+Ghv|L z@^5VJZS-h_CdDn2zhdwZ!`l9}8aFn5{jnO<+_Hv_0G9(eK5*3D@wb2jbQfXiz5pLI@e^LYxQ}~wmLP(zF?kWG4pgfM@;po-xk2Q~ zH|l+J5Hmyq?yI@K0dq3TM>q688buaed1$?+medqv?2Jal7%M>>*85%?VCLQa-Pd{v zxk2Px;sb*+@aV}=7sZB|l9FPksA>o6#*-&UgYu}1q>01B1Kc|zX4c7Dm3KD|4-YCr z45Ba@M~4TPmYa zhDhcIP9}P$#>M3&uU{`Hoy5oc`{23uR#n7hRbTsx!56aDmrp5i@OX^%^b20~yJQ`e zL#Xqw^K*9*XXmBy|vFIlFv9sdQq^X_5xhS>C)E9s5v#bU{HG6Ue z1(Rtuz>}j+zUe)m+BdEjiv`o!ysl4=Pubhqt?RZ;j7H79>(`4r&M(gEZ~MEuo&MO< zr*B*@7fZft+wE`wfZ_!G{{KU3fR{Iu!MZp>$)Wu=@cJ6y=H+y-E>6%Va1X5kUj2Kz zahTKN)5>S0-$Ytl_l>{q1grl>!h>so`PzRLZ@mNjfBbKb{{STfBNrR2NiF~Y002ov JPDHLkV1heTZ+QR! literal 0 HcmV?d00001 diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Assets.java b/src/com/shatteredpixel/shatteredpixeldungeon/Assets.java index 394f5e4d2..6c63f1a53 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/Assets.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/Assets.java @@ -106,6 +106,8 @@ public class Assets { public static final String WATER_CAVES = "water2.png"; public static final String WATER_CITY = "water3.png"; public static final String WATER_HALLS = "water4.png"; + + public static final String WEAK_FLOOR = "custom_tiles/weak_floor.png"; public static final String BUFFS_SMALL = "buffs.png"; public static final String BUFFS_LARGE = "large_buffs.png"; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/WeakFloorPainter.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/WeakFloorPainter.java index 337901e30..f31652b8b 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/WeakFloorPainter.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/WeakFloorPainter.java @@ -20,9 +20,12 @@ */ package com.shatteredpixel.shatteredpixeldungeon.levels.painters; +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.levels.Level; import com.shatteredpixel.shatteredpixeldungeon.levels.Room; import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; +import com.shatteredpixel.shatteredpixeldungeon.sprites.CustomTileVisual; import com.watabou.utils.Point; import com.watabou.utils.Random; @@ -53,5 +56,20 @@ public class WeakFloorPainter extends Painter { drawInside( level, room, new Point( i, room.bottom ), Random.IntRange( 1, room.height() - 2 ), Terrain.EMPTY_SP ); } } + + Point well = null; + if (door.x == room.left) { + well = new Point( room.right-1, Random.Int( 2 ) == 0 ? room.top + 2 : room.bottom - 1 ); + } else if (door.x == room.right) { + well = new Point( room.left+1, Random.Int( 2 ) == 0 ? room.top + 2 : room.bottom - 1 ); + } else if (door.y == room.top) { + well = new Point( Random.Int( 2 ) == 0 ? room.left + 1 : room.right - 1, room.bottom-1 ); + } else if (door.y == room.bottom) { + well = new Point( Random.Int( 2 ) == 0 ? room.left + 1 : room.right - 1, room.top+2 ); + } + set(level, well, Terrain.CHASM); + CustomTileVisual vis = new CustomTileVisual(Assets.WEAK_FLOOR, Dungeon.depth/5, 0, 1, 1); + vis.pos(well.x, well.y); + level.customTiles.add(vis); } }