From a3e5bebe411ffaae7cfd8ade642f06e63b16098d Mon Sep 17 00:00:00 2001 From: Dominic Date: Tue, 15 Jun 2021 12:26:44 -0500 Subject: [PATCH] Enchantment icons --- CalPlayer/CalamityPlayer.cs | 2 + CalPlayer/CalamityPlayerMiscEffects.cs | 14 ++++ ExtraTextures/UI/CalamitasCurseBackground.png | Bin 3317 -> 3403 bytes .../EnchantmentSymbols/CurseIcon_Aflame.png | Bin 0 -> 308 bytes .../CurseIcon_Bloodthirsty.png | Bin 0 -> 295 bytes .../CurseIcon_Capricious.png | Bin 0 -> 277 bytes .../CurseIcon_Ephemeral.png | Bin 0 -> 300 bytes .../EnchantmentSymbols/CurseIcon_Erratic.png | Bin 0 -> 270 bytes .../EnchantmentSymbols/CurseIcon_Evasive.png | Bin 0 -> 246 bytes .../CurseIcon_Evocative.png | Bin 0 -> 314 bytes .../EnchantmentSymbols/CurseIcon_Exhumed.png | Bin 0 -> 819 bytes .../CurseIcon_Hellbound.png | Bin 0 -> 309 bytes .../EnchantmentSymbols/CurseIcon_Incisive.png | Bin 0 -> 334 bytes .../CurseIcon_Indignant.png | Bin 0 -> 302 bytes .../CurseIcon_Lecherous.png | Bin 0 -> 294 bytes .../EnchantmentSymbols/CurseIcon_Oblatory.png | Bin 0 -> 303 bytes .../CurseIcon_Obstinate.png | Bin 0 -> 289 bytes .../CurseIcon_Persecuted.png | Bin 0 -> 281 bytes .../EnchantmentSymbols/CurseIcon_Polluted.png | Bin 0 -> 341 bytes .../CurseIcon_Relentless.png | Bin 0 -> 287 bytes .../CurseIcon_Resentful.png | Bin 0 -> 285 bytes .../CurseIcon_Splintered.png | Bin 0 -> 316 bytes .../EnchantmentSymbols/CurseIcon_Tainted.png | Bin 0 -> 290 bytes .../CurseIcon_Traitorous.png | Bin 0 -> 334 bytes .../CurseIcon_Vindictive.png | Bin 0 -> 303 bytes .../EnchantmentSymbols/CurseIcon_Withered.png | Bin 0 -> 301 bytes .../CalamitasEnchantUI.cs | 38 ++++++++--- UI/CalamitasEnchantments/Enchantment.cs | 10 ++- .../EnchantmentManager.cs | 64 ++++++++++++------ 29 files changed, 96 insertions(+), 32 deletions(-) create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Aflame.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Bloodthirsty.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Capricious.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Ephemeral.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Erratic.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Evasive.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Evocative.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Exhumed.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Hellbound.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Incisive.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Indignant.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Lecherous.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Oblatory.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Obstinate.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Persecuted.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Polluted.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Relentless.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Resentful.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Splintered.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Tainted.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Traitorous.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Vindictive.png create mode 100644 ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Withered.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 1467e28ea8..69914b73ed 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1024,6 +1024,7 @@ namespace CalamityMod.CalPlayer public int witheredWeaponHoldTime = 0; public bool persecutedEnchant = false; + public int persecutedEnchantSummonTimer = 0; #endregion Calamitas Enchant Effects #endregion @@ -2427,6 +2428,7 @@ namespace CalamityMod.CalPlayer animusBoost = 1f; potionTimer = 0; bloodflareCoreLostDefense = 0; + persecutedEnchantSummonTimer = 0; if (BossRushEvent.BossRushActive) { diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 2af4eb10fa..5f766fba27 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -22,6 +22,7 @@ using CalamityMod.NPCs.AcidRain; using CalamityMod.NPCs.Astral; using CalamityMod.NPCs.Crags; using CalamityMod.NPCs.NormalNPCs; +using CalamityMod.NPCs.Other; using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.Projectiles.Boss; using CalamityMod.Projectiles.Environment; @@ -1180,6 +1181,19 @@ namespace CalamityMod.CalPlayer modPlayer.aBulwarkRareTimer--; if (modPlayer.hellbornBoost > 0) modPlayer.hellbornBoost--; + if (modPlayer.persecutedEnchantSummonTimer < 1800) + modPlayer.persecutedEnchantSummonTimer++; + else + { + modPlayer.persecutedEnchantSummonTimer = 0; + if (Main.myPlayer == player.whoAmI && player.Calamity().persecutedEnchant && NPC.CountNPCS(ModContent.NPCType()) < 2) + { + Vector2 spawnPosition = player.Center + Main.rand.NextVector2Unit() * Main.rand.NextFloat(270f, 420f); + int portal = NPC.NewNPC((int)spawnPosition.X, (int)spawnPosition.Y, ModContent.NPCType()); + if (Main.npc.IndexInRange(portal)) + Main.npc[portal].target = player.whoAmI; + } + } if (player.miscCounter % 20 == 0) modPlayer.canFireAtaxiaRangedProjectile = true; if (player.miscCounter % 100 == 0) diff --git a/ExtraTextures/UI/CalamitasCurseBackground.png b/ExtraTextures/UI/CalamitasCurseBackground.png index f6c3ca7fd26bc2e3bbe1e0186c6945ac359ca6df..29555271c1f6e2758c26afaad47b5655305bf5b3 100644 GIT binary patch delta 2329 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 GwSNI%a~huj diff --git a/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Aflame.png b/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Aflame.png new file mode 100644 index 0000000000000000000000000000000000000000..8d8c0b27ec38a0dcaea586ff1a7419d318b08627 GIT binary patch literal 308 zcmV-40n7f0P)Px#?ny*JR9J=Wm`M(UFbqXMRnO5C_diirT!gNorp8kS651ZLW~lV1;BtssK~W z6~Y@7>!4M~7%bClf2$sbH+YFbC3}0#N$t&949IA(Vl?KY`%PJ%+Tf5mnw?T?)480I z&tS)@q^YhkPx#;Ymb6R9J=Wm^%`~APfZ`nViE_?tdazxrkFS!)T-@VTzzc+qeK^SbnmBq9}6H zq7_dZR?)Tct{2|4(IXiAYq$m#bJAFJ7HB)m7<}%fJw)*T2M*&Oly+1Gmh{ za$=H_+8`aFVuscWm{iwdYJ(E*yi?a|H%3fSe##&Kf7cF#&N+|m4ORzNneO0;!`guj zi|b8edxJB(SlyN6hEP%L=gwx#-VY;P%4U>!GHzpWwl_F^lR%7Invo_va~|6pjI6Px#&q+i6kO!VlE95&EzQ6eY7v&&mb$xdPkZ};`t~;d5<@!R#W*4 zs|F2ougKGSkN7u8Monh%CgUyEF-WW?Tkoyr$a)6Jgh>El@SoW^X=QzbPx#=1D|BR9J=Wn86OiAP9!pvghb&@Bc(Q^+mc9i8_QI>r%9SC({Jdei6YEEf&}E z@CJNn~{deh$cN;%IiS^h{*gJRCJCU0p_%*`f~c#+chJO+g?uT`;H-B$c?244*^ zmZ8$*QF#tAr9l+SB*ZNZTGcI@taY652CMr)Iq_W`1c+Bnj%N_)7-kNlUlWc_l*NZP zC{;0f(!1t9VVZ%edq{&NY7a#xW@`>i$V?7t&^=|R0H&b33=`gPx#$Vo&&R9J=WmOBoGFbo72^v*%W{ZB;oE&^4gVC7?*M4(Nkfd&I3FDx*byvt&} z;J_A6&(f?Nf9E6JS({AhNK1ponO>uxH~4EXLmEr&W@H|K-YAbjX`q10s1_cB5y|w* zor;VHW2ZQ(Oi~(5QrOYl_fo|;22nR<{%Zkb26KkGmk07*qoM6N<$f}&e+2mk;8 literal 0 HcmV?d00001 diff --git a/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Evasive.png b/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Evasive.png new file mode 100644 index 0000000000000000000000000000000000000000..3969952ddca0e49467adcdb37c68a23195e492c5 GIT binary patch literal 246 zcmeAS@N?(olHy`uVBq!ia0vp^8X(NU1|)m_?Z^dEjKx9jP7LeL$-D$|Hh8)?hD5Z! zo$e^)U?9LU{S%-1|N4oO`wP58qs?ZzOzHKJSMD$~bZrrE`jw_(TR1h6|E=oxn3Qfm zxsR%~heIAp-I`OU{p&~GncYjdn;B1gNVpqU9o*}v_dzp_Eq`CJ=9;^aQ}#OSX7gXd z^CGtETzf(Og_>ER&+fFHI4gJM?<4;ET=B30J)vP)78&qol`;+0JZ*Lj{pDw literal 0 HcmV?d00001 diff --git a/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Evocative.png b/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Evocative.png new file mode 100644 index 0000000000000000000000000000000000000000..588a10e3b0cdd9f1ed53e1eb80539a85cc5fec3e GIT binary patch literal 314 zcmV-A0mc4_P)Px#^hrcPR9J=Wmq8N3FbGAd<2kzW{wM0ni_}$|gb9J4;uOZbmDYqw-T+df#o}Hz zbi+Y=`FPebUi5Z4Qp@8fQ5|tR;6ZzB*NyN7%{kbybF%NI>)<{w1^t?KXw#T*=%vsN)@Do67gtkBFz{6`-YZwX8$P!&r^ z)t%4a#7t*3DCP2S3JP!VTgAZCQkXTSt!v`uF<61lb^Ld9KVRSEbSi_xoAW+}zM~lS zcS&V%2r%6Ya}MpZsSTo2j8x4V5!7e%_Cc+majgCEQk?Jx7mK_30E7oIAM!#nd;kCd M07*qoM6N<$f>IWXK>z>% literal 0 HcmV?d00001 diff --git a/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Exhumed.png b/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Exhumed.png new file mode 100644 index 0000000000000000000000000000000000000000..584bd628816ff3ca8333a87b1dcb3b413cede037 GIT binary patch literal 819 zcmV-31I+x1P)Px%?MXyIR9J=Wn9ojAK@^9-p<1Z5N(-coO&6v>aiM{*(}WdDG;!g=cW^~qkl-V@ zU}0SO79{R~xN~I;MiV0t{D(qH0E-la7U;N`OzlkP-j--$ukp9JnYm}q%zXFEnYjc1 z^?MS{8a_-dIO`we2LPDAR`*^41sp&e_-O`?`8xk}Xg0l+Qb3X6Z~s09+YV z=+cQ004vYG7tF{ci6AX_ka-)+equu_Dav4fi1iMhHC%-002ovPDHLkV1gm|e~AD9 literal 0 HcmV?d00001 diff --git a/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Hellbound.png b/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Hellbound.png new file mode 100644 index 0000000000000000000000000000000000000000..96b2a87a02d4ed345067c7ecd10ac95eba73108b GIT binary patch literal 309 zcmeAS@N?(olHy`uVBq!ia0vp^8X(NU1|)m_?Z^dEjKx9jP7LeL$-D$|-g~+@hD5Z! zo#DvWY{0{Ech&nBEC1IA`qwO(qr-YS?lxy`=Tu8YM<$-^B!#G+!qa>emnWOsPqd8R zlImahz|Q0sd(Gj5ti1CDvdz7gZM;#%C6d$J^z%PlG;}jPUVd-Jw=-?`m_AE~Y$|t1 zJGROzK`gDbu9-J3)M-iN(~~P^>ZS@LrJ5%21szg26Ias8c-+xTVhe{P$BgE`4xG(# z$CGFJ>@{C2x}wEVZK`Z){dKR9LkVWd({6tG&L1e)d{e6}ZS(z;pQTyuc7$Jb{;O=f z-%;)M@xb(}Uaur_8g5Geovo^w8Spfx_{>w@b=)z3X3H)#H;LexwFTsL22WQ%mvv4F FO#r4yeJ}t3 literal 0 HcmV?d00001 diff --git a/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Incisive.png b/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Incisive.png new file mode 100644 index 0000000000000000000000000000000000000000..fe9459ec6135b8c6b7a8cd9d72eb5d01f8baf6c7 GIT binary patch literal 334 zcmV-U0kQsxP)Px$2uVaiR9J=WmrD-9Fbo9^;vB5F|A|=jBCv{-SpGblB5agdL7N6Ld2v#r&1YP+ z8&A5wqR-4c=t%t`&h?aDzDUMkx=#tubZdj-W7cHqx4F^s25&%{F;Z?4&6+j?P?hLw zaAaZ1qKVPoGd)a-?fM!N;8|QoE|^>H3x=WUP~IS1^^KA9KG4-JX74ZSAV;fYvG&skS?bWe_qEIC-bC*xI1CO1)JWs)t$@`x+Fog&IN4LNij{;HmqjMBpt> gJRg=fxY_)gH?1N_L8CDWXaE2J07*qoM6N<$f)z}a$p8QV literal 0 HcmV?d00001 diff --git a/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Indignant.png b/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Indignant.png new file mode 100644 index 0000000000000000000000000000000000000000..526223131ed6dbf436984aa240f4ab0b60f43162 GIT binary patch literal 302 zcmV+}0nz@6P)Px#=t)FDR9J=Wmq8N4AP7Z&J3U8Nx&Mi}%0<$Z9YRGxnTD!wlSKm2Hz*1$7T0p~ zO7z0B_Q_Ei!-hTk^4>nA-|(;o^qR5~-k^F`8FP}UVs5F{B*Ggs*C32FW;Mnc(jez# zuGbi63WEUr%_YJc^wE0aP;9_w#Z#Ob4TJl60oneEP)Px#;7LS5R9J=Wmq`x8APhx+s-7dO-v2~h^&;)c61d-BP*h>+x5Ny|!%RSuB*}ks zSb--_UG$#q3jiK?IX|i9Hr48feEs!=xuG${BpIiQ3(Fh4H)7h{p~{;%SJbQOH)e?T z7t)|*t_jI4ZQNyE+Dm^S4GP{I>(%p`q%#-NU~k{jMsyr3PO#$D_{$q~tv=KZf>!PXBnQAR=ceYj-JiB9f1Blae0HY`NCGS)fbI>Z`jKl?B<|#^L0S?$Px#=}AOER9J=Wm`e`AFbqVeh;y*w{wHG9i@?f)ME(+^)*)}jA`R_hCRha)V{F!f z2X6H7$z6NLo_tF!m!IyQz;$$k55o;vX6qT0j4B+Oh#sAmwenL{XPu!l0mo`Vur zmc1=6X>hcKR)#m=ZP+qd&tU&Vj&m{EdRp)LrRo_}=-V7>HM8Djvc5seq>{zPz!w=- zsc%qW)ZG8In8jf(+V+O|4Juhv%}qVcc#-}IQp^#jH|TDZ(oV}D`(4vyFg!go?`oty zQcRxS;P5#}FjJ3rKAe0WjACUfU>HCFgNwz{ya4nqGGa93rI-K!002ovPDHLkV1g8i Bgk=B# literal 0 HcmV?d00001 diff --git a/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Obstinate.png b/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Obstinate.png new file mode 100644 index 0000000000000000000000000000000000000000..41a740b38771f711bae0c946055c5ba2b0fd3a66 GIT binary patch literal 289 zcmV++0p9+JP)Px#+et)0R9J=Wmq8AMAPhx|nRBq3`=7{_7nxZ#0i@-F7_sn{h)7=Gw-PND&*JV{ zcqcDC`i0;A(xI-i_1n@te0nVe7;9o4g8`_q=qyT1X)raC8g;^WmU#?vo+-DvDRb=@ zRLn?R%0K4)1~cZmm?7{?zTaSglxL-R={VHIFs2MLkvS#*)QZ9Lr|Ji@=1TMEY!d2X z7!wAe+b4}TRG^6A4OVY(Cx6*W4Z|C3sU(i5oMXK#n=q*67+?ym;aN-=l&I|s(Ml9y n%3$e#7kUph#|&?9v3Qz4B&jV?Mun_f00000NkvXXu0mjfvf+7? literal 0 HcmV?d00001 diff --git a/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Persecuted.png b/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Persecuted.png new file mode 100644 index 0000000000000000000000000000000000000000..d4999cd4adef288907f7baf1210cf18255b3375a GIT binary patch literal 281 zcmV+!0p|XRP)Px#(@8`@R9J=Wm_ZJNAPhz8#B;cs`=4l5bCGdH;xu6UZHf59TM{ksY!MKd#8|Qe zeq_^4zhhr-`9kqt@genP%?fm4E(E{9UgiqJ8@yb_4s(lY|LePx$4@pEpR9J=Wm`x6ZAPh#!WX|Dg?tdazUWD096KOvBBTNG5+h}4z^U^|*=%I~d z1?;r(ZAN21baeitlGk5n@4<f|FrLtKs1dMskpmx#*hvs>yi`D!B!#S&3^hIiJA` zIajQQ%6QeJ9LLY6HfZIVYQ}34kbm6-7>v8blm;2gq>Ph9`%1|0278=~L+@DsTwEhi nwaiWbEVR=5kL>UUA6oeW06|Gaftp%w00000NkvXXu0mjfbkdpI literal 0 HcmV?d00001 diff --git a/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Relentless.png b/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Relentless.png new file mode 100644 index 0000000000000000000000000000000000000000..df19b8d4c1994064a898f9f1cc1c0d07760997f1 GIT binary patch literal 287 zcmV+)0pR|LP)Px#*-1n}R9J=Wm_ZK1APfYZs_)1t|9??W`AB+-idJB+6VzhrxrKm0qXnFZBuNsR z#XI07t9Qtu&AG|04t{uN`!-LuW5t|mMtOh0v&uXM3(yRXEpU_FoiB#r4br(OZW8MTL8$YwWq){s&0XxMTB!4n=vOry*P!rbkXF`Q zRm@3fg9uyiiO6SHDs|*i_G=N^AY0d6%_>D)gH|@IZ1p0p!Mj}eey%c~!QOusEao#< lz?!MHv(@+T29xC1ya8;GBwXoCI8p!r002ovPDHLkV1nEGe(C@K literal 0 HcmV?d00001 diff --git a/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Resentful.png b/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Resentful.png new file mode 100644 index 0000000000000000000000000000000000000000..6259357bb1e2546cdd4fd349dcbcfe8b775871ab GIT binary patch literal 285 zcmV+&0pk9NP)Px#*GWV{R9J=Wm`xIcFbGDe<2kzW{wH$fMeHgwEd%nA#5Sb7t>nj-M2JL5lEmg= z1?=?H9-TFPZ**8gez3Tre}HOGFlQNajfI+=!eB9H?pGEMjcJ)2-rx$vKyUnJyu@oJ zT`MxYL3CfiI8HybGXH0=AbbTb=MdIlPOz1nU@K}S;omc~`naectB7lmSk5eFfLzSm zYs`_0k!nUX3B*H$uLnI9^{r!u&BdOIy6de@=ub2|yuq*kSTbWCcH(;?T2doS!M jzVlY+y8nhXn6&Z&iViO~@sRyX00000NkvXXu0mjfL+^b) literal 0 HcmV?d00001 diff --git a/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Splintered.png b/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Splintered.png new file mode 100644 index 0000000000000000000000000000000000000000..0f75aff9d7fc72c7365a0394714dd8a2b940bec3 GIT binary patch literal 316 zcmV-C0mJ@@P)Px#_DMuRR9J=Wm^}`IFbqaNs-A<1`=5x3i=>k!aO2nx5w)wlg&{v8FOD4mCX-2S zmQfS!Sgl=4t8v3|d8b$J3q8f#+HsVj2G!lnXV75EYedl)1_#t)Q|;Bv5#bHCPO&u)S}RM}?LDH;SEkEzvcrH-7iY9g-9L% O0000Px#+(|@1R9J=Wm`e`BAPfafm2-5J`=6+*T!gMHwU)6T&?*>tHj%=AWJ3s1k|ePy zUWFGuTSawdjFT>?@dF&>Hkt+%bJCb+zh(HVoo8|jgQhuY05A{r!z^#`Fv_~j$@d>7 zxt;8sKb1H~9Ano^-+1HPYZL%TLhCVm0eHE77 o@&<=ir2+iIDMTA)agyB48%A3*T`w|$2mk;807*qoM6N<$f*gx?i~s-t literal 0 HcmV?d00001 diff --git a/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Traitorous.png b/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Traitorous.png new file mode 100644 index 0000000000000000000000000000000000000000..9a7f8c7cecbd50c96ce6c2af5d8d4fa1699b6ddf GIT binary patch literal 334 zcmV-U0kQsxP)Px$2uVaiR9J=Wm`e_XAP@!HiRW;|{ZHhIi!iHB6nIVZancOdMnfV(!4rh&rH^e? zMJFA68>DwQ@>TVI+MDzno@n4kcWZ%Ct7_IU=*U;kFAe4mHmCTKTEvhv|DVB(x!QzQ znKW;3j|*Z$LJyI-(x~urs?jrVFzLlfhqi}RDJ`WQjg)zV$sD|ZOg4SrxIDA#5l3oD zgWRJKT}7T)hlwUN$iyZ^cy1w+inTk7d4n)Py}K2~bE@>uYY-v)y`egh>07xYpKXhI zgHno1AX6o?Rr^Qt2D?ud8q%J9_c|#?DAFyqVOoPdDb`Z@E{ZH^ur#mHesj*1WLS!| gpp%Jd*W#C6zC{i^Uk+RXdjJ3c07*qoM6N<$f}m55!~g&Q literal 0 HcmV?d00001 diff --git a/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Vindictive.png b/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Vindictive.png new file mode 100644 index 0000000000000000000000000000000000000000..3a768a4e8e59eb37aa990585cc5e87d32e36af8e GIT binary patch literal 303 zcmV+~0nq-5P)Px#=}AOER9J=Wn86OiAP9!pvgg=o@Bc(Q?M1p1iT*(pu!$1COWU-i<_n0H=n&&! zec?-QKE0$^ANmD{RP&q~?FL@60~UrwtcFt?zrli*G0erv zTy$PcWzdyVn8WGj!ALJ=dey9ct7kNi!2xrlu}syzyg^SVQO&hX6misf6WQNjfy*4; zx0+04kO}o#!K6wGgJP$cy?bl1yumZTDDGVySD`f*N2`}fX|S64M@=d{J%2C8o=I@6 znhdPKi71Id#$-~!wE|z>U}R5%xc=2_zpFb$`2$loIaNqEAKw4~002ovPDHLkV1ipM Bhp+$u literal 0 HcmV?d00001 diff --git a/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Withered.png b/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Withered.png new file mode 100644 index 0000000000000000000000000000000000000000..fd200486135311cd3ff5e68f4c0c37070304f99d GIT binary patch literal 301 zcmV+|0n+}7P)Px#=Sf6CR9J=Wm`e`BAPhvORnO5??|-7MdXaSHiV|#Ws0t(bZL&at@HFNVAW7D8 z(Hfq(YfZ;5#(3c6dife0?C+dr*Dx0~78a(ja}qfIlX=C;F8Jzf25Z}2kNGNV<0k!jbCMP<-sXmn2=SPcL$8El+7LMPvvz^#z`G!wbi z&E7@KZ=gL7 literal 0 HcmV?d00001 diff --git a/UI/CalamitasEnchantments/CalamitasEnchantUI.cs b/UI/CalamitasEnchantments/CalamitasEnchantUI.cs index 5abf79f364..e4434c1263 100644 --- a/UI/CalamitasEnchantments/CalamitasEnchantUI.cs +++ b/UI/CalamitasEnchantments/CalamitasEnchantUI.cs @@ -22,7 +22,7 @@ namespace CalamityMod.UI.CalamitasEnchants public static bool CurrentlyViewing = false; - public static readonly Vector2 ReforgeUITopLeft = new Vector2(28f, 245f); + public static readonly Vector2 ReforgeUITopLeft = new Vector2(68f, 320f); public static readonly float ResolutionRatio = Main.screenHeight / 1440f; public static Rectangle MouseScreenArea => Utils.CenteredRectangle(Main.MouseScreen, Vector2.One * 2f); @@ -87,10 +87,6 @@ namespace CalamityMod.UI.CalamitasEnchants // Draw the background. spriteBatch.Draw(backgroundTexture, ReforgeUITopLeft, null, Color.White, 0f, Vector2.Zero, backgroundScale, SpriteEffects.None, 0f); - // Draw the item icon. - Vector2 itemSlotDrawPosition = ReforgeUITopLeft + new Vector2(30f, 50f) * backgroundScale; - Vector2 reforgeIconDrawPosition = ReforgeUITopLeft + new Vector2(88f, 60f) * backgroundScale; - // Prevent the player from say, firing a weapon while the mouse is hovering over the UI. DisableMouseWhenOverUI(backgroundTexture, backgroundScale); @@ -104,11 +100,20 @@ namespace CalamityMod.UI.CalamitasEnchants Point costDrawPositionTopLeft = (ReforgeUITopLeft + new Vector2(50f, 78f) * backgroundScale).ToPoint(); cost = DrawEnchantmentCost(spriteBatch, costDrawPositionTopLeft); Point descriptionDrawPositionTopLeft = costDrawPositionTopLeft; - descriptionDrawPositionTopLeft.Y += 90; + descriptionDrawPositionTopLeft.Y += 70; + Vector2 iconDrawPositionTopLeft = costDrawPositionTopLeft.ToVector2() + new Vector2(270f, -24f); DrawEnchantmentDescription(spriteBatch, descriptionDrawPositionTopLeft); + if (!string.IsNullOrEmpty(SelectedEnchantment.Value.IconTexturePath)) + { + Texture2D iconTexture = ModContent.GetTexture(SelectedEnchantment.Value.IconTexturePath); + DrawIcon(spriteBatch, iconDrawPositionTopLeft, iconTexture); + } } + // Draw the item icon. + Vector2 itemSlotDrawPosition = ReforgeUITopLeft + new Vector2(30f, 50f) * backgroundScale; + Vector2 reforgeIconDrawPosition = ReforgeUITopLeft + new Vector2(84f, 60f) * backgroundScale; DrawItemIcon(spriteBatch, itemSlotDrawPosition, reforgeIconDrawPosition, backgroundScale, out bool isHoveringOverItemIcon, out bool isHoveringOverReforgeIcon); if (isHoveringOverItemIcon) InteractWithItemSlot(); @@ -167,7 +172,18 @@ namespace CalamityMod.UI.CalamitasEnchants if (SelectedEnchantment.HasValue && SelectedEnchantment.Value.Name == EnchantmentManager.UpgradeEnchantName) cost = (int)MathHelper.Min(cost, Item.buyPrice(5)) * 5; - ItemSlot.DrawMoney(spriteBatch, "Cost: ", costDrawPositionTopLeft.X, costDrawPositionTopLeft.Y, Utils.CoinsSplit(cost)); + // Draw the coin costs. + string costText = "Cost: "; + Utils.DrawBorderStringFourWay(spriteBatch, Main.fontMouseText, costText, costDrawPositionTopLeft.X, costDrawPositionTopLeft.Y + 45f, Color.White * (Main.mouseTextColor / 255f), Color.Black, Vector2.Zero); + costDrawPositionTopLeft.X += (int)(Main.fontMouseText.MeasureString(costText).X * 0.5f + 12f); + + int[] coinsArray = Utils.CoinsSplit(cost); + for (int i = 0; i < 4; i++) + { + Vector2 drawPosition = new Vector2(costDrawPositionTopLeft.X + ChatManager.GetStringSize(Main.fontMouseText, costText, Vector2.One, -1f).X + (24 * i) - 24f, costDrawPositionTopLeft.Y + 54f); + spriteBatch.Draw(Main.itemTexture[ItemID.PlatinumCoin - i], drawPosition, null, Color.White, 0f, Main.itemTexture[ItemID.PlatinumCoin - i].Size() * 0.5f, 1f, SpriteEffects.None, 0f); + Utils.DrawBorderStringFourWay(spriteBatch, Main.fontItemStack, coinsArray[3 - i].ToString(), drawPosition.X - 11f, drawPosition.Y, Color.White, Color.Black, new Vector2(0.3f), 0.75f); + } return cost; } @@ -176,7 +192,7 @@ namespace CalamityMod.UI.CalamitasEnchants { Vector2 vectorDrawPosition = descriptionDrawPositionTopLeft.ToVector2(); Vector2 scale = new Vector2(0.67f, 0.7f) * MathHelper.Clamp(ResolutionRatio, 0.825f, 1f); - foreach (string line in Utils.WordwrapString(SelectedEnchantment.Value.Description, Main.fontMouseText, 400, 10, out _)) + foreach (string line in Utils.WordwrapString(SelectedEnchantment.Value.Description, Main.fontMouseText, 465, 10, out _)) { if (string.IsNullOrEmpty(line)) continue; @@ -186,6 +202,11 @@ namespace CalamityMod.UI.CalamitasEnchants } } + public static void DrawIcon(SpriteBatch spriteBatch, Vector2 drawPositionTopLeft, Texture2D texture) + { + spriteBatch.Draw(texture, drawPositionTopLeft, null, Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + } + public static void DrawItemIcon(SpriteBatch spriteBatch, Vector2 itemSlotDrawPosition, Vector2 reforgeIconDrawPosition, Vector2 scale, out bool isHoveringOverItemIcon, out bool isHoveringOverReforgeIcon) { isHoveringOverReforgeIcon = false; @@ -261,6 +282,7 @@ namespace CalamityMod.UI.CalamitasEnchants // Attempt to exchange if the slot is clicked. if (Main.mouseLeftRelease && Main.mouseLeft && (Main.mouseItem.CanBeEnchantedBySomething() || Main.mouseItem.IsAir)) { + EnchantIndex = 0; Utils.Swap(ref Main.mouseItem, ref CurrentlyHeldItem); Main.PlaySound(SoundID.Grab); } diff --git a/UI/CalamitasEnchantments/Enchantment.cs b/UI/CalamitasEnchantments/Enchantment.cs index e098ecb163..e24f411e0e 100644 --- a/UI/CalamitasEnchantments/Enchantment.cs +++ b/UI/CalamitasEnchantments/Enchantment.cs @@ -7,6 +7,7 @@ namespace CalamityMod.UI.CalamitasEnchants { public string Name; public string Description; + public string IconTexturePath; public Action CreationEffect; public Action HoldEffect; @@ -15,7 +16,7 @@ namespace CalamityMod.UI.CalamitasEnchants // This is internal because CanBeAppliedTo should be used over this field directly. // Using that has the benefit of null checks and is objectively superior to using the raw delegate. internal Predicate ApplyRequirement; - public Enchantment(string name, string description, int id, Action creationEffect, Action holdEffect, Predicate requirement) + public Enchantment(string name, string description, int id, string iconTexturePath, Action creationEffect, Action holdEffect, Predicate requirement) { Name = name; Description = description; @@ -23,8 +24,9 @@ namespace CalamityMod.UI.CalamitasEnchants HoldEffect = holdEffect; ApplyRequirement = requirement; ID = id; + IconTexturePath = iconTexturePath; } - public Enchantment(string name, string description, int id, Action holdEffect, Predicate requirement) + public Enchantment(string name, string description, int id, string iconTexturePath, Action holdEffect, Predicate requirement) { Name = name; Description = description; @@ -32,8 +34,9 @@ namespace CalamityMod.UI.CalamitasEnchants HoldEffect = holdEffect; ApplyRequirement = requirement; ID = id; + IconTexturePath = iconTexturePath; } - public Enchantment(string name, string description, int id, Action creationEffect, Predicate requirement) + public Enchantment(string name, string description, int id, string iconTexturePath, Action creationEffect, Predicate requirement) { Name = name; Description = description; @@ -41,6 +44,7 @@ namespace CalamityMod.UI.CalamitasEnchants HoldEffect = null; ApplyRequirement = requirement; ID = id; + IconTexturePath = iconTexturePath; } public bool CanBeAppliedTo(Item item) diff --git a/UI/CalamitasEnchantments/EnchantmentManager.cs b/UI/CalamitasEnchantments/EnchantmentManager.cs index 6a1502f4c6..ba3dddd99c 100644 --- a/UI/CalamitasEnchantments/EnchantmentManager.cs +++ b/UI/CalamitasEnchantments/EnchantmentManager.cs @@ -58,14 +58,15 @@ namespace CalamityMod.UI.CalamitasEnchants public static void ConstructFromModcall(IEnumerable parameters) { int secondaryArgumentCount = parameters.Count(); - if (secondaryArgumentCount < 4) + if (secondaryArgumentCount < 5) throw new ArgumentNullException("ERROR: A minimum of 4 arguments must be supplied to this command; a name, a description, an id, and a requirement predicate."); - if (secondaryArgumentCount > 6) + if (secondaryArgumentCount > 7) throw new ArgumentNullException("ERROR: A maximum of 6 arguments can be supplied to this command."); string name = string.Empty; string description = string.Empty; int id = -1; + string iconTexturePath = null; Predicate requirement = null; Action creationEffect = null; Action holdEffect = null; @@ -94,33 +95,39 @@ namespace CalamityMod.UI.CalamitasEnchants else throw new ArgumentException("The fourth argument to this command must be an Item Predicate."); + // Fifth element - the texture path. This determines what icon is drawn on the UI when selected. It may be null to specify that none should be drawn. + if (parameters.ElementAt(4) is string iconTexturePathElement) + iconTexturePath = iconTexturePathElement; + else + throw new ArgumentException("The fifth argument to this command must be a string."); + // Optional elements - creation and hold effects. switch (secondaryArgumentCount) { - case 5: - object fifthElement = parameters.ElementAt(4); - if (fifthElement is Action creationElement) + case 6: + object sixthElement = parameters.ElementAt(4); + if (sixthElement is Action creationElement) creationEffect = creationElement; - else if (fifthElement is Action holdElement) + else if (sixthElement is Action holdElement) holdEffect = holdElement; else - throw new ArgumentException("The fifth argument to this command must be an Item or Player Action."); + throw new ArgumentException("The sixth argument to this command must be an Item or Player Action."); break; - case 6: - fifthElement = parameters.ElementAt(4); - object sixthElement = parameters.ElementAt(5); - if (fifthElement is Action creationElement2) + case 7: + sixthElement = parameters.ElementAt(4); + object seventhElement = parameters.ElementAt(5); + if (sixthElement is Action creationElement2) { creationEffect = creationElement2; - holdEffect = sixthElement as Action; + holdEffect = seventhElement as Action; } - else if (fifthElement is Action holdElement2) + else if (sixthElement is Action holdElement2) { - creationEffect = sixthElement as Action; + creationEffect = seventhElement as Action; holdEffect = holdElement2; } else - throw new ArgumentException("The fifth argument to this command must be an Item or Player Action and the sixth must be the other action type."); + throw new ArgumentException("The sixth argument to this command must be an Item or Player Action and the sixth must be the other action type."); break; } @@ -128,33 +135,37 @@ namespace CalamityMod.UI.CalamitasEnchants if (EnchantmentList.Any(enchant => enchant.ID == id) || id == ClearEnchantmentID) throw new ArgumentException("An enchantment with this ID already exists. Another one must be specified."); - EnchantmentList.Add(new Enchantment(name, description, id, creationEffect, holdEffect, requirement)); + EnchantmentList.Add(new Enchantment(name, description, id, iconTexturePathElement, creationEffect, holdEffect, requirement)); } internal static void LoadAllEnchantments() { EnchantmentList = new List { - new Enchantment(UpgradeEnchantName, "Transforms this item into something significantly better.", + new Enchantment(UpgradeEnchantName, "Transforms this item into something significantly stronger.", 1, + "CalamityMod/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Exhumed", null, null, item => ItemUpgradeRelationship.ContainsKey(item.type)), - new Enchantment("Cursed", "Summons demons that harm you but drop healing items on death on item usage.", + new Enchantment("Indignant", "Summons demons that harm you but drop healing items on death on item usage.", 100, + "CalamityMod/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Indignant", null, player => player.Calamity().cursedSummonsEnchant = true, item => item.damage > 0 && item.maxStack == 1 && item.summon), new Enchantment("Aflame", "Lights enemies ablaze on hit but also causes the user to take damage over time when holding this item.", 200, + "CalamityMod/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Aflame", null, player => player.Calamity().flamingItemEnchant = true, item => item.damage > 0 && item.maxStack == 1 && !item.summon), new Enchantment("Oblatory", "Reduces mana cost and greatly increases damage but sometimes causes this item to use your life.", 300, + "CalamityMod/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Oblatory", item => { item.damage = (int)(item.damage * 1.5); @@ -165,30 +176,35 @@ namespace CalamityMod.UI.CalamitasEnchants new Enchantment("Resentful", "Makes the damage of projectiles vary based on how far the hit target is from you. The farther, the more damage, and vice versa.", 400, + "CalamityMod/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Resentful", null, player => player.Calamity().farProximityRewardEnchant = true, item => item.damage > 0 && item.maxStack == 1 && item.shoot > ProjectileID.None), new Enchantment("Bloodthirsty", "Makes the damage of projectiles vary based on how far the hit target is from you. The closer, the more damage, and vice versa.", 500, + "CalamityMod/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Bloodthirsty", null, player => player.Calamity().closeProximityRewardEnchant = true, item => item.damage > 0 && item.maxStack == 1 && item.shoot > ProjectileID.None), new Enchantment("Ephemeral", "Causes the damage output of this item to discharge from exhaustive use. Its damage returns naturally when not being used.", 600, + "CalamityMod/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Ephemeral", null, player => player.Calamity().dischargingItemEnchant = true, item => item.damage > 0 && item.maxStack == 1 && !item.summon), new Enchantment("Hellbound", "Causes minions to be created with a 40 second timer. Once it runs out, they explode violently. Minions do more damage the longer they live and idly explode as well.", 700, + "CalamityMod/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Hellbound", null, player => player.Calamity().explosiveMinionsEnchant = true, item => item.damage > 0 && item.maxStack == 1 && item.summon), new Enchantment("Tainted", "Removes projectile shooting capabilities of this item. In exchange, two skeletal arms are released on use that slice at the mouse position.", 800, + "CalamityMod/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Tainted", item => item.useTime = item.useAnimation = 25, player => { @@ -219,27 +235,33 @@ namespace CalamityMod.UI.CalamitasEnchants }, item => item.damage > 0 && item.maxStack == 1 && item.melee && !item.noUseGraphic && item.shoot > ProjectileID.None), - new Enchantment("Treacherous", "Causes this item to sometimes release a monster that hurts both you and enemies when you have less than 50% mana.", + new Enchantment("Traitorous", "Causes this item to sometimes release a monster that hurts both you and enemies when you have less than 50% mana.", 900, + "CalamityMod/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Traitorous", null, player => player.Calamity().manaMonsterEnchant = true, item => item.damage > 0 && item.maxStack == 1 && item.magic && item.mana > 0), new Enchantment("Withering", "You heal when hurt based on damage dealt. After being hurt, the weapon rapidly drains your life to deal massive damage.", 1000, + "CalamityMod/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Withered", null, player => player.Calamity().witheringWeaponEnchant = true, item => item.damage > 0 && item.maxStack == 1 && !item.summon), - new Enchantment("Persecuted", "You attract portals which summon demons on hit. The portal must be brought close to death or the demons will attack you. Otherwise they attack enemies.", + new Enchantment("Persecuted", "When attacked, or over time, demon portals appear near you. If sufficiently damaged they are friendly; otherwise they attack you.", 1100, + "CalamityMod/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Persecuted", null, player => player.Calamity().persecutedEnchant = true, item => item.damage > 0 && item.maxStack == 1 && item.shoot > ProjectileID.None), }; // Special disenchantment thing. This is separated from the list on purpose. - ClearEnchantment = new Enchantment("Disenchant", string.Empty, ClearEnchantmentID, + ClearEnchantment = new Enchantment("Disenchant", + string.Empty, + ClearEnchantmentID, + null, item => item.Calamity().AppliedEnchantment = null, item => item.maxStack == 1 && item.shoot >= ProjectileID.None);