From 027e1b9bbaf24d43a2e6c8b779bd6a6dbf23db28 Mon Sep 17 00:00:00 2001 From: "wagic.the.homebrew" Date: Sat, 17 Jan 2009 10:16:10 +0000 Subject: [PATCH] Erwan - Updated alternate render - Display hybrid mana cost on alternate Render - Display big card in graveyard - gray out alternate render when targetChooser is active - Non-copyrighted avatars for the AI. They suck... --- projects/mtg/bin/Res/ai/baka/avatar.jpg | Bin 0 -> 1166 bytes .../mtg/bin/Res/ai/baka/avatars/avatar1.jpg | Bin 0 -> 1277 bytes .../mtg/bin/Res/ai/baka/avatars/avatar2.jpg | Bin 0 -> 1249 bytes .../mtg/bin/Res/ai/baka/avatars/avatar3.jpg | Bin 0 -> 1255 bytes .../mtg/bin/Res/ai/baka/avatars/avatar4.jpg | Bin 0 -> 1168 bytes .../mtg/bin/Res/ai/baka/avatars/avatar5.jpg | Bin 0 -> 1232 bytes .../mtg/bin/Res/ai/baka/avatars/avatar6.jpg | Bin 0 -> 1140 bytes projects/mtg/bin/Res/sets/POR/_cards.dat | 1339 +++++++++++++++++ projects/mtg/include/ManaCost.h | 2 + projects/mtg/src/ActionStack.cpp | 2 +- projects/mtg/src/CardDisplay.cpp | 5 +- projects/mtg/src/CardGui.cpp | 129 +- projects/mtg/src/GameStateMenu.cpp | 2 +- projects/mtg/src/ManaCost.cpp | 7 +- 14 files changed, 1450 insertions(+), 36 deletions(-) create mode 100644 projects/mtg/bin/Res/ai/baka/avatar.jpg create mode 100644 projects/mtg/bin/Res/ai/baka/avatars/avatar1.jpg create mode 100644 projects/mtg/bin/Res/ai/baka/avatars/avatar2.jpg create mode 100644 projects/mtg/bin/Res/ai/baka/avatars/avatar3.jpg create mode 100644 projects/mtg/bin/Res/ai/baka/avatars/avatar4.jpg create mode 100644 projects/mtg/bin/Res/ai/baka/avatars/avatar5.jpg create mode 100644 projects/mtg/bin/Res/ai/baka/avatars/avatar6.jpg create mode 100644 projects/mtg/bin/Res/sets/POR/_cards.dat diff --git a/projects/mtg/bin/Res/ai/baka/avatar.jpg b/projects/mtg/bin/Res/ai/baka/avatar.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b45bd236af0ade546e41cf9428dec88dcce22758 GIT binary patch literal 1166 zcmbW#e^Aq99KiAC`)hkZY}=P@{5aD6U@_?r*#JSxAE1tHSpyV7N{S!Kkdm;_K&Ka$X<6L>ff*g^qjp|@R-fmd=bz{Mx_jPt z-@tI-dn7g+Oa?^JG};9V1?DK)jy%|U#Di@|J-FWK!7Xhb+_#wE!8n44bp+qk6YP&C z7$*`OzJy?H62ZyI1RIwUoSQ6Zvk%wUkZLJ_%iU%!;a|2flrYHBRx_xlnT)jijh!(@6cYvF$~Kv z9LusC#|ebg7#UM5rg*9my3c7!O7x;NA%frGWA~lc1XcxsMBrZuxUYfFM^%_IE z(PUn?K6^t>?#8^L;>}x1tfgCDdbx7PPTMQH_Uzqfud9Ex!O_(G*1@-14z;$wckKO+ zHCc>IgU<8{ z6sI@ru;1=}b&$^=IK0z?kEo&W#< literal 0 HcmV?d00001 diff --git a/projects/mtg/bin/Res/ai/baka/avatars/avatar1.jpg b/projects/mtg/bin/Res/ai/baka/avatars/avatar1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c6901281f2ef6d8294ab3dd2503aae1075f9ff56 GIT binary patch literal 1277 zcmex=Jir3f_C}nMVFJTxMi91OP-h2W1_L0z zU{9W*1EA~w0R}-11|tS#W=16jCP7AKLB{{L8Cn=vnVDIbnORv_SXfzE+1PnG*nvQR zn}?HESU^NrNI*zPR9sF{R7^%pNJvUqN=9BmQAtrmQdM0=L0wK!QGpStjh&61pM!&6 zK~zXoRDo3R{|MtE1_nk}MlgVd3?maW3(z?noLt-j3`~s7%uFoItUy-+Rn`LK7+3^Z zg%k}P*@OcV*_8@Kj2b5{ECr+Nabot8FYu9hwy!G(W<0ns_J%91?)yGet zzkL1n{m0K=j10^W?*K`NkC6N$2=osV3kx#~JIFtbOyxk#EXcyDXviky7|5PjD6C}E z$RXl1apA^;oXW;QA4HRiE^>*fm^@Vd2=WrxN5pxki7X$%Jp}j9|62?^%#6Tf!z{>P z&+y~kwY%$7ITl-5tPlH9`JwFnk=r~4)6Um~&#QX+;xm8_%_VRCdxJOL(;>zyza(TYfXFmL=_;+@G$zPi@y1(=)L?8as{%~ZM z>}9tXZhYEbPKRyUKJSq0RPns~UO$?@wOxLjyS2MtMdRmgu6HZ_`po$)H8ggteo=Mx z#lzwl*~nE{LQVT-M<*ZpRp@H@BiVQTWP8i3WAi#D9WUu?_>lcFzqwvG{lgngo;5Z5 zpT-$3coBG1Xt&0?zI(wr4E;S-;Wttx%G)UFY0tD3zoL)GOD&k~ zlhS(Z(T+#^l77s$`Ste7=1I|oXJc#K(qqJPLL(h!2t2l2@3+)St9z+u)bqV@ZK8=w zomz61?tB`Q`H5X&mm$5TnZ} z0L4K1KypGrtbhe$GZUM-ffDNsy6Qkn#U*h86}^W@Z*yv! z7FJePHg;YPb|4Vo=HcWO77!5@5)cv+6_=9~6_XJY5|UDul95+XR8ka?R8?0|P?u9w zRA2;ZV`pRM=iuO15ET*?RUj4oKf<_(fq{{g5e$GK3kHl#%q&3XaBy;Q3otM-GBY!= zFtY+(2~=4Nlw)8KWEE00bYv3_Ok`Io6ftU?xR68HY2!iBpoX!XqN1l2cOC(lau%ic3n%$}1|Xnp;}i+B-VC zCQY6)b=ve9GiNPYykzOJeA&aSFc^aar4&0 zM~|O8efIpt%U2&ieg5+G+xH(oe=#yJL%ahdG5jM4^bZpY3o{El$UlrsuS~;l_iU%Emz-M3agxa*3&!JXHM%@)Fob#CfQREFZx=1ozMX zTMRtRjKE~WEXZKb@Z;7!VUtFO*GH@L8|%dG{g~(KUBNy1dLL_{6q9z`G3jO5Z|iTa z_T2FAP^6RMgs+eGZEoLCBC9oH)x~E|Z&uE;OO0A?lX39Y^Y)77ZxvU!thHSybzMQv zPy2+8<3i7+ekV@%$b`Qv+nShLxa`zqrQF*uo4vo=hRV=Ub!Y^tNWQ}p;Oa#n#cMt{p0=d z9rs+#$Bmz!79OoR{rL9Gt*ck&Np_1T9b04irpF-SiV&m1VV>(dqxvKhpE|YVp51xS zue5g2%D{Wa8NTJo^e+Fj@qE)51*RuR6YuE3iN0abyHFMSwF7Byb#YOw!* F695)UisAqO literal 0 HcmV?d00001 diff --git a/projects/mtg/bin/Res/ai/baka/avatars/avatar3.jpg b/projects/mtg/bin/Res/ai/baka/avatars/avatar3.jpg new file mode 100644 index 0000000000000000000000000000000000000000..13415974bde0def7fe76f519606bf391cc218c42 GIT binary patch literal 1255 zcmex=*@2iJh(&=|0SSZT*npS=h|%Q~ zfMOthAUPo*R=|R>nTbu^K#Bc7z#z!MV8o!z%&5e`B*@4t$oT&@Lkj~dGcyY_Gb;-V z3o9!t8#^xtI}iwP^KkMC3y25{2?z;^ipxogiphux2}vnS$;c}xDk+Lcs;a9fsLLrT zDlh`Iv9q!Bb8zr0hzf~{Dv%2PA7Na?z`)4L2nN8A1p`JVW)`4xI5@eu1sIqZnVFeb zm|20Y1gfkB$}zAAvI;30I#U-U>$dGXcJ4ZK_{h;?$4{I*b?NeztJkjIxOwa0 zqsLF4K70P+<*SdMK7aZ8?fZ|PzZe;qA>IL!82%9i`iF^yg_(sNWKS#c?s+z;ylzumXF{bg8S$H zEe0NDMqsjG7G$tz_;K$V+q{4-ClvK=#yFRD9t zE41rH;E7eOC%&wAXZ4a|?!{^5$J z$eNnXw=eCELidT;1D3~fQ{O&VxhwnL&H2ke9OH`6Fb|J7nbp5^kMqZU zoL`Q4#N=uBX+N{?EEj$~J?NZg(vivGa{tmL^a?|lG9|W2u3PCgU%5qeT`g;sglpS0 zd49Q2-ShgB4mms#wav6U^q=9b>3#2oM?Q&hSuXp}kZ|;c_NfZ78kQYNHRsM;YGiU* z#qQ|8ufq@l>*@2iJh(&=|0SSZT*npS=h|%Q~ zfMOthAUPo*R=|R>nTbu^K#Bc7z#z!MV8o!z%&5e`B*@4t$oT&@Lkj~dGcyY_Gb;-V z3o9!t8#^xtI}iwP^KkMC3y25{2?z;^ipxogiphux2}vnS$;c}xDk+Lcs;a9fsLLrT zDlh`Iv9q!Bb8zr0hzf~{Dv%2PA7Na?z`)4L2nN8A1p`JVW)`4xI5@eu1sIqZnVFeb zm|20Y1gfkB$}zAAvI;30I#U-U>$dGXcJ4ZK_{h;?$4{I*b?NeztJkjIxOwa0 zqsLF4K70P+<*SdMK7aZ8?fZ|PzZe;qA>IL!82%9i`iF^yg_(sNWKS#c?s+z;ylzumXF{bg8S$H zEe0NDMqsjG7G$tz`0?!A)pg4vuB5ArzPZn9$A0I>R3T?Ut?Ea64j(K$uC|tIhlFl? z%^%LoI*TtTri7lm=pZNmNd9JDw5{!uJ~^jf;SE2oAG};q^zl)NGP~%n+?BT+b*FSI ztuy--e$;-;w)xrlD^6WxWw&i*sCnB{=xXKIZn5kF+wu0~S=vV`u6!syS{wNx`BBI& z+c^b(M>Hg!?Xf-_C(|bp<{mif)!MXd2bP-TOAU6@uiNP!RGW8NrdhRG>Sy(1mg{l~ zyCx-gGoKe-_G|6ob(fU|zpe^yEZ``dkimR3_0rQw2~iuV^lvHi@0z}v{3DA~HSLC_ z$@w3y5B@z^z}ua1q+nI!g^(@X-(7VX6il|vSh|3zOJf1s@$cd<{gxg7x3+G|D+Wz| WuPEnB4N{(87pq@uc4esle-i*BT3H_e literal 0 HcmV?d00001 diff --git a/projects/mtg/bin/Res/ai/baka/avatars/avatar5.jpg b/projects/mtg/bin/Res/ai/baka/avatars/avatar5.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ffb3ffc7eb04d717d02fab6f51f9682d93d3944a GIT binary patch literal 1232 zcmex=*@2iJh(&=|0SSZT*npS=h|%Q~ zfMOthAUPo*R=|R>nTbu^K#Bc7z#z!MV8o!z%&5e`B*@4t$oT&@Lkj~dGcyY_Gb;-V z3o9!t8#^xtI}iwP^KkMC3y25{2?z;^ipxogiphux2}vnS$;c}xDk+Lcs;a9fsLLrT zDlh`Iv9q!Bb8zr0hzf~{Dv%2PA7Na?z`)4L2nN8A1p`JVW)`4xI5@eu1sIqZnVFeb zm|20Y1gfkB$}zAAvI;30I#U-U>$dGXcJ4ZK_{h;?$4{I*b?NeztJkjIxOwa0 zqsLF4K70P+<*SdMK7aZ8?fZ|PzZe;qA>IL!82%9i`iF^yg_(sNWKS#c?s+z;ylzumXF{bg8S$H zEe0NDMqsjG7G$tz`0?o4-F2!Qi!CkIhyJMiQ1$-EZJvT@=WD{}RYaN8dMW%k_UiZI zZ&jDxggf(#&@GNw(6W=E7qUB@Zmp$K;7BvyXxkpiTxF~;rhrg`Xecp z@8#kWWp>eDsjF{BpH0*{)xAA`X^rD=ryEhXv&ESN7C(EVZLu?WQuy9;x2C*!tl{Uy zrKj~vPW*D0<~f6Bvty5+ma0oh~fyQY{aR z72UHohoQfxDx9^lIHxu(*zrR5^P6k?m+o==xQcVjF^@TU+I`y3^gBPFUw7BrQgyq` ztX;o)&h5~K4JhIA~YtqEJ7faU#zgVUW@aW9W>%mpfhuc( zatthjtU`*0j%>n#iR?;+B1Vl97jh^&Z9FI%bn%0VaZ*teCzqJGgrtbvx}>nyN9P&a7buactm7Wa!P7idPZheaY<=ec|~Pab4zPmdq-#2q{&mJPMbbs z=B!1Fmn>bje8tLDn>KIRx^4T8ox2VlK63Qf@e?OcUAlbb>b2`PZr*zM=<$=M&z`?{ z`Re1R&tJZN`~KtSFGdDth?7hl)I^q#;2whe=l?AR9%e>h zvSAivuxGeAFOW-2U1FX5Q8}A_?=;uMiLr4z&P>Y-U#I>2zRaC7x0>73CD+Xo2rH`P zi~3X^=w7_MCQ#@OYuaPe7gb_g<(4w-+F&XAnRQFwWX+)BS>MjLeiz!it4&>Wao|d^ zx7m`*wTirc&zt&X(L}o!OV=sySiI6CpIKY*#CqkA>)V1}l}$3x-gDK|tXyk(*NLet z_p4{UTPPR0@?c!dZMoFshn8Xw^5PiR2Y-liU+%KPK{PN|Ie5Z?kdO1Vr7Mo+T&b)~ zN)^|>JNHuTLI=mUe!qjNt}Dx}R8okUr+NR@rK(wvzwx~O_Ea*uc(SjE+?MdjQxZo- m_%s$Ub!jYM-1l+O)O{b9EMRJMWoi&-zSP6-rLlnj|4jfYAaf7^ literal 0 HcmV?d00001 diff --git a/projects/mtg/bin/Res/sets/POR/_cards.dat b/projects/mtg/bin/Res/sets/POR/_cards.dat new file mode 100644 index 000000000..62f2b75fd --- /dev/null +++ b/projects/mtg/bin/Res/sets/POR/_cards.dat @@ -0,0 +1,1339 @@ +#PORTAL +#Thanks to Dr.Solomat for the initial release 2009/01/01 +[card] +text= Swampwalk (This creature is unblockable as long as defending player controls a Swamp.) +id=4288 +name=Anaconda +rarity=U +mana={3}{G} +type=Creature +subtype=Snake +power=3 +toughness=3 +abilities=swampwalk +[/card] +[card] +text=Target creature gets +3/+3 and gains flying until end of turn. +target=creature +id=4370 +name=Angelic Blessing +rarity=C +mana={2}{W} +type=Instant +auto=3/3 +auto=flying +[/card] +[card] +text=Flying, vigilance +id=4371 +name=Archangel +rarity=R +mana={5}{W}{W} +type=Creature +subtype=Angel +power=5 +toughness=5 +abilities=flying,vigilance +[/card] +[card] +text=Vigilance +id=4372 +name=Ardent Militia +rarity=U +mana={4}{W} +type=Creature +subtype=Human Soldier +power=2 +toughness=5 +abilities=vigilance +[/card] +[card] +text=Destroy all lands. +auto=destroy all(land) +id=id=4373 +name=Armageddon +rarity=R +mana={3}{W} +type=Sorcery +[/card] +[card] +text=Flying +id=4374 +name=Armored Pegasus +rarity=C +mana={1}{W} +type=Creature +subtype=Pegasus +power=1 +toughness=2 +abilities=flying +[/card] +[card] +text=Flying +id=4207 +name=Arrogant Vampire +rarity=U +mana={3}{B}{B} +type=Creature +subtype=Vampire +power=4 +toughness=3 +abilities=flying +[/card] +[card] +text=Play Assassin's Blade only during the declare attackers step and only if you are the defending player. Destroy target nonblack attacking creature. +id=4208 +target=creature[-black;attacking] +auto=destroy +name=Assassin's Blade +rarity=U +mana={1}{B} +type=Instant +[/card] +[card] +text=Bee Sting deals 2 damage to target creature or player. +id=4289 +target=creature,player +auto=damage:2 +name=Bee Sting +rarity=U +mana={3}{G} +type=Sorcery +[/card] +[card] +text=Blaze deals X damage to target creature or player. +id=4329 +target=creature,player +auto=damage:X +name=Blaze +rarity=U +mana={X}{R} +type=sorcery +[/card] +[card] +text=Flying +id=4209 +name=Bog Imp +rarity=C +mana={1}{B} +type=Creature +subtype=Imp +power=1 +toughness=1 +abilities=flying +[/card] +[card] +text=Swampwalk +id=4210 +name=Bog Raiders +rarity=C +mana={2}{B} +type=Creature +subtype=Zombie +power=2 +toughness=2 +abilites=swampwalk +[/card] +[card] +text=Swampwalk +id=4211 +name=Bog Raiders +rarity=U +mana={3}{B} +type=Creature +subtype=Wraith +power=3 +toughness=3 +abilites=swampwalk +[/card] +[card] +text=Destroy all Islands. +auto=destroy all(island) +id=4330 +name=Boiling Seas +rarity=U +mana={3}{R} +type=Sorcery +[/card] +[card] +id=4377 +name=Border Guard +rarity=C +mana={2}{W} +type=Creature +subtype=Human Soldier +power=1 +toughness=4 +[/card] +[card] +text=Islandwalk +id=4290 +name=Bull Hippo +rarity=U +mana={3}{G} +type=Creature +subtype=Hippo +power=3 +toughness=3 +abilities=Islandwalk +[/card] +[card] +text=Capricious Sorcerer deals 1 damage to target creature or player. Play this ability only during your turn, before attackers are declared. +alias=1217 +id=4250 +name=Capricious Sorcerer +rarity=R +mana={2}{U} +type=Creature +subtype=Human Wizard +power=1 +toughness=1 +[/card] +[card] +text=Target creature gains flying until end of turn. Draw a card +target=creature +auto=flying +auto=draw:1 +id=4251 +name=Cloak of Feathers +rarity=C +mana={U} +type=Sorcery +[/card] +[card] +text=Play Command of Unsummoning only during the declare attackers step and only if you are the defending player.Return one or two target attacking creatures to their owner's hand. +target=creatures [attacking] +alias=1229 +name=Command of Unsummoning +rarity=U +mana={2}{U} +type=Instant +[/card] +[card] +id=4256 +name=Coral Eel +rarity=C +mana={1}{U} +type=Creature +subtype=Fish +power=2 +toughness=1 +[/card] +[card] +text=Play Defiant Stand only during the declare attackers step and only if you are the defending player. Target creature gets +1/+3 until the end of the turn. If that creature is tapped, untap it. +target=creature +auto=untap +auto=1/3 +id=4380 +name=Defiant Stand +rarity=U +mana={1}{W} +type=Instant +[/card] +[card] +text=Return target sorcery card from your graveyard to your hand. +target=sorcery|myGraveyard +alias=1263 +id=4259 +name=DéjEVu +rarity=C +mana={2}{B} +type=sorcery +[/card] +[card] +text=Flying +id=4333 +name=Desert Drake +rarity=U +mana={3}{R} +type=Creature +subtype=Drake +power=2 +toughness=2 +abilites=flying +[/card] +[card] +text=Destroy all creatures and lands +auto=destroy all (creature,land) +id=4334 +name=Devastation +rarity=R +mana={5}{R}{R} +type=sorcery +[/card] +[card] +id=4381 +name=Devoted Hero +rarity=C +mana={W} +type=Creature +subtype=Elf Soldier +power=1 +toughness=2 +[/card] +[card] +text=Flying +id=4260 +name=Djinn of the Lamp +rarity=R +mana={5}{U}{U} +type=Creature +subtype=Djinn +power=5 +toughness=6 +abilities=flying +[/card] +[card] +text=Flying When Dread Reaper comes into play, you lose 5 life. +auto=life:-5 +id=4217 +name=Dread Reaper +rarity=R +mana={3}{B}{B}{B} +type=Creature +subtype=Horror +power=6 +toughness=5 +abilities=flying +[/card] +[card] +text=Earthquake deals X damage to each creature without flying and each player. +alias=1289 +id=4335 +name=Earthquake +rarity=R +type=Sorcery +mana={X}{R} +[/card] +[card] +text=Forestwalk +id=4293 +name=Elite Cat Warrior +rarity=C +mana={2}{G} +type=Creature +subtype=Cat Warrior +power=2 +toughness=3 +abilities=forestwalk +[/card] +[card] +text=Return target card from your graveyard to your hand. +target=*|myGraveyard +alias=1263 +id=4295 +name=Elven Cache +rarity=C +mana={2}{G}{G} +type=Sorcery +[/card] +[card] +id=4296 +name=Elvish Ranger +rarity=C +mana={2}{G} +type=Creature +subtype=Elf +power=4 +toughness=1 +[/card] +[card] +id=4221 +name=Feral Shadow +rarity=C +mana={2}{B} +type=Creature +subtype=Nightstalker +power=2 +toughness=1 +abilities=flying +[/card] +[card] +text=When Fire Imp comes into play, it deals 2 damage to target creature. +target=creature +auto=damage:2 +id=4337 +name=Fire Imp +rarity=U +mana={2}{R} +type=Creature +subytpe=Imp +power=2 +toughness=1 +[/card] +[card] +text=Destroy all Plains. +auto=destroy all(plains) +id=4340 +name=Flashfires +rarity=U +type=Sorcery +mana={3}{R} +[/card] +[card] +id=4384 +name=Foot Soldiers +rarity=C +mana={3}{W} +type=Creature +subtype=Human Soldier +power=2 +toughness=4 +[/card] +[card] +text={T}: Add {G} to your mana pool. +id=4413 +name=Forest +auto={T}:add{G} +rarity=L +type=Basic Land +subtype=Forest +[/card] +[card] +text={T}: Add {G} to your mana pool. +id=4416 +name=Forest +auto={T}:add{G} +rarity=L +type=Basic Land +subtype=Forest +[/card] +[card] +text={T}: Add {G} to your mana pool. +id=4414 +name=Forest +auto={T}:add{G} +rarity=L +type=Basic Land +subtype=Forest +[/card] +[card] +text={T}: Add {G} to your mana pool. +id=4415 +name=Forest +auto={T}:add{G} +rarity=L +type=Basic Land +subtype=Forest +[/card] +[card] +id=4263 +name=Giant Octopus +rarity=C +mana={3}{U} +type=Creature +subtype=Octopus +power=3 +toughness=3 +[/card] +[card] +text=Reach +id=4298 +name=Giant Spider +rarity=C +mana={3}{G} +type=Creature +subtype=Spider +power=2 +toughness=4 +abilities=reach +[/card] +[card] +id=4342 +name=Goblin Bully +rarity=C +mana={1}{R} +type=Creature +subtype=Goblin +power=2 +toughness=1 +[/card] +[card] +id=4299 +name=Gorilla Warrior +rarity=C +mana={2}{G} +type=Creature +subtype=Ape Warrior +power=3 +toughness=2 +[/card] +[card] +text=When Gravedigger comes into play, you may return target creature card from your graveyard to your hand. +target=creature|myGraveyard +alias=1174 +id=4223 +name=Gravedigger +rarity=U +mana={3}{B} +type=Creature +subtype=Zombie +power=2 +toughness=2 +[/card] +[card] +id=4300 +name=Grizzly Bear +rarity=C +mana={1}{G} +type=Creature +subtype=Bear +power=2 +toughness=2 +[/card] +[card] +text=Destroy target nonblack creature. +target=creature[-black] +auto=destroy +id=4225 +name=Hand of Death +rarity=C +mana={2}{B} +type=Sorcery +[/card] +[card] +id=4343 +name=Highland Giant +rarity=C +mana={2}{R}{R} +type=Creature +subtype=Giant +power=3 +toughness=4 +[/card] +[card] +id=4344 +name=Hill Giant +rarity=C +mana={3}{R} +type=Creature +subtype=Giant +power=3 +toughness=3 +[/card] +[card] +id=4264 +name=Horned Turtle +rarity=C +mana={2}{U} +type=Creature +subtype=Turtle +power=1 +toughness=4 +[/card] +[card] +id=4264 +name=Horned Turtle +rarity=C +mana={2}{U} +type=Creature +subtype=Turtle +power=1 +toughness=4 +[/card] +[card] +text=Target creature gets +4/+0 until end of turn. +target=creature +auto=4/0 +id=4226 +name=Howling Fury +rarity=C +mana={2}{B} +type=Sorcery +[/card] +[card] +text=Hurricane deals X damage to each creature with flying and each player. +id=id=4301 +alias=1251 +name=Hurricane +rarity=R +mana={X}{G} +type=Sorcery +[/card] +[card] +text={T}: Add {U} to your mana pool. +auto={T}:add {U} +id=4424 +name=Island +rarity=L +type=Basic Land +subtype=Island +[/card] +[card] +text={T}: Add {U} to your mana pool. +auto={T}:add {U} +id=4422 +name=Island +rarity=L +type=Basic Land +subtype=Island +[/card] +[card] +text={T}: Add {U} to your mana pool. +auto={T}:add {U} +id=4423 +name=Island +rarity=L +type=Basic Land +subtype=Island +[/card] +[card] +text=Reach (This creature can block creatures with flying.) +id=4387 +name=Keen-Eyed Archers +rarity=C +mana={2}{W} +type=Creature +subtype=Elf Archer +power=2 +toughness=2 +abilities=reach +[/card] +[card] +text={T}: Destroy target tapped creature. +auto={T}:destroy target(creature[tapped]) +id=4227 +name=King's Assassin +rarity=R +type=Creature +mana={1}{B}{B} +power=1 +subtype=Human Assassin +toughness=1 +[/card] +[card] +id=4388 +name=Knight Errant +rarity=C +mana={1}{W} +type=Creature +subtype=Human Knight +power=2 +toughness=2 +[/card] +[card] +id=4388 +name=Knight Errant +rarity=C +mana={1}{W} +type=Creature +subtype=Human Knight +power=2 +toughness=2 +[/card] +[card] +text=Lava Axe deals 5 damage to target player. +target=player +auto=Damage:5 +id=4348 +name=Lava Axe +rarity=C +color=Red +mana={4}{R} +type=Sorcery +[/card] +[card] +text=Destroy target creature or land. +target=creature,land +auto=destroy +id=4349 +name=Lava Flow +rarity=U +mana={3}{R}{R} +type=Sorcery +[/card] +[card] +id=4350 +name=Lizard Warrior +rarity=C +mana={3}{R} +type=Creature +subtype=Lizard Warrior +power=4 +toughness=2 +[/card] +[card] +text=When Man-o'-War comes into play, return target creature to its owner's hand. +alias=1229 +id=4266 +target=creature +name=Man-o'-War +mana={2}{U} +rarity=U +type=Creature +subtype=Jellyfish +power=2 +toughness=2 +[/card] +[card] +id=4267 +name=Merfolk of the Pearl Trident +rarity=C +mana={U} +type=Creature +subtype=Merfolk +power=1 +toughness=1 +[/card] +[card] +id=4351 +name=Minotaur Warrior +rarity=C +mana={2}{R} +type=Creature +subtype=Minotaur Warrior +power=2 +toughness=3 +[/card] +[card] +text=Target creature gets +4/+4 until end of turn. +id=4304 +target=creature +auto=4/4 +name=Monstrous Growth +rarity=C +mana={1}{G} +type=Sorcery +[/card] +[card] +text=Flying +id=4306 +name=Moon Sprite +rarity=U +mana={1}{G} +type=Creature +subtype=Faerie +power=1 +toughness=1 +abilities=flying +[/card] +[card] +text=Flying +id=4306 +name=Moon Sprite +rarity=U +mana={1}{G} +type=Creature +subtype=Faerie +power=1 +toughness=1 +abilities=flying +[/card] +[card] +text={T}: Add {R} to your mana pool. +auto={T}: Add {R} +id=4420 +name=Mountain +rarity=L +type=Basic Land +subtype=Mountain +[/card] +[card] +text={T}: Add {R} to your mana pool. +auto={T}: Add {R} +id=4418 +name=Mountain +rarity=L +type=Basic Land +subtype=Mountain +[/card] +[card] +text={T}: Add {R} to your mana pool. +auto={T}: Add {R} +id=4419 +name=Mountain +rarity=L +type=Basic Land +subtype=Mountain +[/card] +[card] +text=Mountainwalk +id=4352 +name=Mountain Goat +rarity=U +mana={R} +type=Creature +subtype=Goat +power=1 +toughness=1 +abilities=mountainwalk +[/card] +[card] +id=4231 +name=Muck Rats +rarity=C +mana={B} +type=Creature +subtype=Rat +power=1 +toughness=1 +[/card] +[card] +text=Mountainwalk +id=4352 +name=Mountain Goat +rarity=U +mana={R} +type=Creature +subtype=Goat +power=1 +toughness=1 +abilities=mountainwalk +[/card] +[card] +text=Destroy all green creatures. +auto=destroy all(creature[green]) +id=4232 +name=Nature's Ruin +rarity=U +mana={2}{B} +type=Sorcery +[/card] +[card] +id=9845 +name=Panther Warriors +rarity=C +mana={4}{G} +type=Creature +subtype=Cat Warrior +power=6 +toughness=3 +[/card] +[card] +text=Phantom Warrior is unblockable. +id=4272 +name=Phantom Warrior +rarity=R +mana={1}{U}{U} +type=Creature +subtype=Illusion Warrior +power=2 +toughness=2 +abilites=unblockable +[/card] +[card] +text={T}: Add {W} to your mana pool. +auto={T}: Add {W} +id=4425 +name=Plains +rarity=L +type=Basic Land +subtype=Plains +[/card] +[card] +text={T}: Add {W} to your mana pool. +auto={T}: Add {W} +id=4427 +name=Plains +rarity=L +type=Basic Land +subtype=Plains +[/card] +[card] +text={T}: Add {W} to your mana pool. +auto={T}: Add {W} +id=4426 +name=Plains +rarity=L +type=Basic Land +subtype=Plains +[/card] +[card] +text={T}: Add {W} to your mana pool. +auto={T}: Add {W} +id=4428 +name=Plains +rarity=L +type=Basic Land +subtype=Plains +[/card] +[card] +text=Phantom Warrior is unblockable. +id=4272 +name=Phantom Warrior +rarity=R +mana={1}{U}{U} +type=Creature +subtype=Illusion Warrior +power=2 +toughness=2 +abilites=unblockable +[/card] +[card] +text=Pyroclasm deals 2 damage to each creature. +id=4354 +alias=2650 +name=Pyroclasm +rarity=U +type=Sorcery +mana={1}{R} +[/card] +[card] +id=4234 +name=Python +rarity=C +mana={1}{B}{B} +type=Creature +subtype=Snake +power=3 +toughness=2 +[/card] +[card] +text=Haste +id=4355 +name=Raging Cougar +rarity=C +mana={2}{R} +type=Creature +subtype=Cat +power=2 +toughness=2 +abilities=haste +[/card] +[card] +text=Haste +id=4356 +name=Raging Goblin +rarity=C +mana={R} +type=Creature +subtype=Goblin Berserker +power=1 +toughness=1 +abilities=haste +[/card] +[card] +text=Haste +id=4358 +name=Raging Minotaur +rarity=C +mana={2}{R}{R} +type=Creature +subtype=Minotaur Berserker +power=3 +toughness=3 +abilities=haste +[/card] +[card] +text=Destroy target land. +target=land +auto=destroy +id=4235 +name=Rain of Tears +rarity=U +color=Black +mana={1}{B}{B} +type=Sorcery +[/card] +[card] +text=Return target creature card from your graveyard to your hand. +target=creature|myGraveyard +id=4236 +alias=1174 +name=Raise Dead +rarity=C +mana={B} +type=Sorcery +[/card] +[card] +id=4315 +name=Redwood Treefolk +rarity=C +mana={4}{G} +type=Creature +subtype=Treefolk +power=3 +toughness=6 +[/card] +[card] +id=4390 +name=Regal Unicorn +rarity=C +mana={2}{W} +type=Creature +subtype=Unicorn +power=2 +toughness=3 +[/card] +[card] +id=4315 +name=Rowan Treefolk +rarity=C +mana={3}{G} +type=Creature +subtype=Treefolk +power=3 +toughness=4 +[/card] +[card] +text=You gain 4 life. +target=player +auto=life:4 +id=4393 +name=Sacred Nectar +rarity=C +color=White +mana={1}{W} +type=Sorcery +[/card] +[card] +text=Scorching Spear deals 1 damage to target creature or player. +target=creature,player +auto=Damage:1 +id=4360 +name=Scorching Spear +rarity=C +color=Red +mana={R} +type=Sorcery +[/card] +[card] +text=When Serpent Assassin comes into play, you may destroy target nonblack creature. +target=creature[-black] +auto=destroy +id=4237 +name=Serpent Assassin +rarity=R +mana={3}{B}{B} +type=Creature +subtype=Snake Assassin +power=2 +toughness=2 +[/card] +[card] +text=When Serpent Warrior comes into play, you lose 3 life. +auto=life:-3 +id=4238 +name=Serpent Warrior +rarity=C +mana={2}{B} +type=Creature +subtype=Snake Warrior +power=3 +toughness=3 +[/card] +[card] +id=4239 +name=Skeletal Crocodile +rarity=C +mana={3}{B} +type=Creature +subtype=Crocodile Skeleton +power=5 +toughness=1 +[/card] +[card] +id=4240 +name=Skeletal Snake +rarity=C +mana={1}{B} +type=Creature +subtype=Snake Skeleton +power=2 +toughness=1 +[/card] +[card] +text=Flying (This creature can't be blocked except by creatures with flying or reach.) +id=4274 +name=Snapping Drake +rarity=C +mana={3}{U} +type=Creature +subtype=Drake +power=3 +toughness=2 +abilities=flying +[/card] +[card] +text=Soul Shred deals 3 damage to target nonblack creature. You gain 3 life. +target=creature[-black] +auto=destroy +auto=life:3 +id=4241 +name=Soul Shred +rarity=C +mana={3}{B}{B} +type=Sorcery +[/card] +[card] +id=4317 +name=Spined Wurm +rarity=C +mana={4}{G} +type=Creature +subtype=Wurm +power=5 +toughness=4 +[/card] +[card] +text=When Spiritual Guardian comes into play, you gain 4 life. +auto=life:4 +id=4395 +name=Spiritual Guardian +rarity=R +mana={3}{W}{W} +type=Creature +subtype=Spirit +power=3 +toughness=4 +[/card] +[card] +text=Flying +id=4396 +name=Spotted Griffin +rarity=C +mana={3}{W} +type=Creature +subtype=Griffin +power=2 +toughness=3 +abilities=flying +[/card] +[card] +text=Flying +id=4398 +name=Starlit Angel +rarity=U +mana={3}{W}{W} +type=Creature +subtype=Angel +power=3 +toughness=4 +abilities=flying +[/card] +[card] +id=4400 +auto={T}:2/2 target(creature) +name=Stern Marshal +rarity=R +mana={2}{W} +type=Creature +subtype=Human Soldier +power=2 +toughness=2 +[/card] +[card] +text=Destroy target land. +target=land +auto=destroy +id=4363 +name=Stone Rain +rarity=C +mana={2}{R} +type=Sorcery +[/card] +[card] +text=Flying +id=4276 +name=Storm Crow +rarity=C +mana={1}{U} +type=Creature +subtype=Bird +power=1 +toughness=2 +abilities=flying +[/card] +[card] +text={T}: Add {B} to your mana pool. +auto={T}: Add {B} +id=4411 +name=Swamp +rarity=L +type=Basic Land +subtype=Swamp +[/card] +[card] +text={T}: Add {B} to your mana pool. +auto={T}: Add {B} +id=4410 +name=Swamp +rarity=L +type=Basic Land +subtype=Swamp +[/card] +[card] +text={T}: Add {B} to your mana pool. +auto={T}: Add {B} +id=4412 +name=Swamp +rarity=L +type=Basic Land +subtype=Swamp +[/card] +[card] +text=Return target creature to its owner's hand. Draw a card. +target=creature +auto=draw:1 +id=4277 +alias=1229 +name=Symbol of Unsummoning +rarity=C +mana={2}{U} +type=Sorcery +[/card] +[card] +text=Draw two cards. +auto=draw:2 +id=4283 +name=Touch of Brilliance +rarity=C +mana={3}{U} +type=Sorcery +[/card] +[card] +text=Vampiric Feast deals 4 damage to target creature or player and you gain 4 life. +target=creature,player +auto=damage:4 target +auto=life:4 +id=4243 +name=Vampiric Feast +rarity=U +mana={5}{B}{B} +type=Sorcery +[/card] +[card] +text=Vampiric Touch deals 2 damage to target opponent and you gain 2 life. +target=player +auto=damage:2 +auto=life:2 +id=4244 +name=Vampiric Touch +rarity=C +mana={2}{B} +type=Sorcery +[/card] +[card] +text=When Venerable Monk comes into play, you gain 2 life. +auto=life:2 +id=129786 +name=Venerable Monk +rarity=U +color=White +mana={2}{W} +type=Creature +subtype=Human Monk Cleric +power=2 +toughness=2 +[/card] +[card] +text=Destroy target tapped creature. +target=creature(tapped) +auto=destroy +id=4404 +name=Vengeance +rarity=U +mana={3}{W} +type=Sorcery +[/card] +[card] +text=Destroy all white creatures. +auto=destroy all(creature[white]) +id=4245 +name=Virtue's Ruin +rarity=U +mana={2}{B} +type=Sorcery +[/card] +[card] +text=Flying, haste +id=4365 +name=Volcanic Dragon +rarity=R +mana={4}{R}{R} +type=Creature +subtype=Dragon +power=4 +toughness=4 +abilities=flying,haste +[/card] +[card] +text=Volcanic Hammer deals 3 damage to target creature or player. +target=creature,player +auto=Damage:3 +id=4366 +name=Volcanic Hammer +rarity=C +color=Red +mana={1}{R} +type=Sorcery +[/card] +[card] +text=Defender (This creature can't attack.) +id=4367 +name=Wall of Granite +rarity=U +mana={2}{R} +type=Creature +subtype=Wall +power=0 +toughness=7 +abilities=defender +[/card] +[card] +text=Defender, flying (This creature can't attack, and it can block creatures with flying.) +id=4405 +name=Wall of Swords +rarity=U +mana={3}{W} +type=Creature +subtype=Wall +power=3 +toughness=5 +abilities=defender,flying +[/card] +[card] +id=4324 +name=Whiptail Wurm +rarity=U +mana={6}{G} +type=Creature +subtype=Wurm +power=8 +toughness=5 +[/card] +[card] +text=Forestwalk +id=4325 +name=Willow Dryad +rarity=C +mana={G} +type=Creature +subtype=Dryad +power=1 +toughness=1 +abilities=forestwalk +[/card] +[card] +text=Flying (This creature can't be blocked except by creatures with flying or reach.) +id=4284 +name=Wind Drake +rarity=C +mana={2}{U} +type=Creature +subtype=Drake +power=2 +toughness=2 +abilities=flying +[/card] +[card] +text=Destroy target land. +target=land +auto=destroy +id=4326 +name=Winter's Grasp +rarity=U +color=Green +mana={1}{G}{G} +type=Sorcery +[/card] +[card] +text=Destroy all creatures. They can't be regenerated. +auto=bury all(creature) +alias=1372 +id=4408 +name=Wrath of God +rarity=R +mana={2}{W}{W} +type=Sorcery +[/card] diff --git a/projects/mtg/include/ManaCost.h b/projects/mtg/include/ManaCost.h index ac6734b61..05542c223 100644 --- a/projects/mtg/include/ManaCost.h +++ b/projects/mtg/include/ManaCost.h @@ -24,6 +24,8 @@ class ManaCost{ int getConvertedCost(); string toString(); int getCost(int color); + //Returns NULL if i is greater than nbhybrids + ManaCostHybrid * getHybridCost(unsigned int i); int getMainColor(); int hasColor(int color); int remove (int color, int value); diff --git a/projects/mtg/src/ActionStack.cpp b/projects/mtg/src/ActionStack.cpp index b9d2f8f98..9186e3656 100644 --- a/projects/mtg/src/ActionStack.cpp +++ b/projects/mtg/src/ActionStack.cpp @@ -643,7 +643,7 @@ void ActionStack::Render(){ JLBFont * mFont = GameApp::CommonRes->GetJLBFont(Constants::MAIN_FONT); mFont->SetBase(0); mFont->SetScale(DEFAULT_MAIN_FONT_SCALE); - + mFont->SetColor(ARGB(255,255,255,255)); JRenderer * renderer = JRenderer::GetInstance(); //JQuad * back = GameApp::CommonRes->GetQuad("interrupt"); diff --git a/projects/mtg/src/CardDisplay.cpp b/projects/mtg/src/CardDisplay.cpp index afc6872b0..59b0dfe2b 100644 --- a/projects/mtg/src/CardDisplay.cpp +++ b/projects/mtg/src/CardDisplay.cpp @@ -137,8 +137,11 @@ void CardDisplay::Render(){ } } } - if (mObjects[mCurr]){ + + if (mCount && mObjects[mCurr] != NULL){ mObjects[mCurr]->Render(); + CardGui * cardg = ((CardGui *)mObjects[mCurr]); + cardg->RenderBig(-1,-1,showBigCards-1); } } diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index bc0344b71..3cecc3350 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -1,5 +1,6 @@ #include "../include/config.h" #include "../include/CardGui.h" +#include "../include/ManaCostHybrid.h" #include void CardGui::alternateRender(MTGCard * card, JLBFont * mFont, JQuad ** manaIcons, float x, float y, float rotation, float scale){ @@ -58,6 +59,34 @@ void CardGui::alternateRender(MTGCard * card, JLBFont * mFont, JQuad ** manaIcon ManaCost * manacost = card->getManaCost(); int nbicons = 0; + ManaCostHybrid * h; + + unsigned int j = 0; + while (h = manacost->getHybridCost(j)){ + OutputDebugString("Hybrid\n"); + for (int i = 0; i < 2; i++){ + int color = h->color1; + int value = h->value1; + if (i) { + color = h->color2; + value = h->value2; + } + int offset = 2*i-1; + v.x = (width/2 - 24 - 16*nbicons + 8*i)*scale; + v.y = ((-height/2) + 16 + 8*i) * scale; + v.Rotate(rotation); + if (color == 0){ + sprintf(buf,"%i",value); + mFont->SetColor(ARGB(255,255,255,255)); + mFont->DrawString(buf,x+v.x,y+v.y); + }else{ + renderer->RenderQuad(manaIcons[color],x+v.x,y+v.y,rotation,0.4*scale, 0.4*scale); + } + } + nbicons++; + j++; + } + for (int i = 1; i < Constants::MTG_NB_COLORS - 1; i++){ int cost = manacost->getCost(i); @@ -251,60 +280,96 @@ void CardGui::Render(){ float tap = (float)(card->isTapped()); float rotation = M_PI_2 * tap; + float mScale = mHeight / 64; + float myW = 45 * mScale; + float myH = 60*mScale; + GameObserver * game = GameObserver::GetInstance(); + TargetChooser * tc = NULL; + if (game) tc = game->getCurrentTargetChooser(); + float myX = x + (32 * tap * mScale); + float myY = y+(20 * tap * mScale); if (quad){ - float mScale = mHeight / quad->mHeight; - float myX = x + (quad->mHeight/2 * tap * mScale); - float myY = y+(quad->mWidth/2 * tap * mScale); + mScale = mHeight / quad->mHeight; + myH = mHeight; + myW = quad->mWidth * mScale; + myX = x + (quad->mHeight/2 * tap * mScale); + myY = y+(quad->mWidth/2 * tap * mScale); if (mHeight-defaultHeight){ if (card->isTapped()){ - renderer->FillRect(myX + 1*(mHeight-defaultHeight) - quad->mHeight * mScale , myY + 1*(mHeight-defaultHeight) , quad->mHeight * mScale, quad->mWidth * mScale, ARGB(128,0,0,0)); + renderer->FillRect(myX + 1*(mHeight-defaultHeight) - quad->mHeight * mScale , myY + 1*(mHeight-defaultHeight) , quad->mHeight * mScale, quad->mWidth * mScale, ARGB(128,0,0,0)); }else{ - renderer->FillRect(myX + 1*(mHeight-defaultHeight) , myY + 1*(mHeight-defaultHeight) , quad->mWidth * mScale, quad->mHeight * mScale, ARGB(128,0,0,0)); + renderer->FillRect(myX + 1*(mHeight-defaultHeight) , myY + 1*(mHeight-defaultHeight) , quad->mWidth * mScale, quad->mHeight * mScale, ARGB(128,0,0,0)); } } quad->SetColor(ARGB( alpha,255,255,255)); - GameObserver * game = GameObserver::GetInstance(); - TargetChooser * tc = NULL; - if (game) tc = game->getCurrentTargetChooser(); + if (tc){ if (!tc->canTarget(card)){ - quad->SetColor(ARGB( alpha,50,50,50)); + quad->SetColor(ARGB( alpha,50,50,50)); } } renderer->RenderQuad(quad, myX , myY , rotation,mScale,mScale); - if (tc && tc->alreadyHasTarget(card)){ - if (card->isTapped()){ - renderer->FillRect(myX- quad->mHeight * mScale , myY , quad->mHeight * mScale, quad->mWidth * mScale, ARGB(128,255,0,0)); - }else{ - renderer->FillRect(myX , myY , quad->mWidth * mScale, quad->mHeight * mScale, ARGB(128,255,0,0)); - } - } quad->SetColor(ARGB( alpha,255,255,255)); }else{ int color = card->getColor(); - float mScale = mHeight / 64; - float myX = x + (32 * tap * mScale); - float myY = y+(20 * tap * mScale); - char buffer[200]; - sprintf(buffer, "%s",card->getName()); + + + + char buffer[200]; + sprintf(buffer, "%s",card->getName()); mFont->SetColor(ARGB(255,Constants::_r[color],Constants::_g[color],Constants::_b[color])); - if (card->isTapped()){ - renderer->FillRect(myX - 64 * mScale , myY , 64 * mScale, 40 * mScale, ARGB(255,0,0,0)); - renderer->DrawRect(myX - 64 * mScale , myY , 64 * mScale, 40 * mScale, ARGB(255,Constants::_r[color],Constants::_g[color],Constants::_b[color])); - mFont->SetScale(0.20); - mFont->DrawString(buffer,myX - (64 * mScale)+4,myY + 1); - }else{ - renderer->FillRect(myX , myY , 40 * mScale, 64 * mScale, ARGB(255,0,0,0)); - renderer->DrawRect(myX , myY , 40 * mScale, 64 * mScale, ARGB(255,Constants::_r[color],Constants::_g[color],Constants::_b[color])); - mFont->SetScale(0.40); - mFont->DrawString(buffer,myX+4,myY + 1); - } + JQuad * mIcon = NULL; + if (card->hasSubtype("plains")){ + mIcon = GameApp::CommonRes->GetQuad("c_white"); + }else if(card->hasSubtype("swamp")){ + mIcon = GameApp::CommonRes->GetQuad("c_black"); + }else if(card->hasSubtype("forest")){ + mIcon = GameApp::CommonRes->GetQuad("c_green"); + }else if(card->hasSubtype("mountain")){ + mIcon = GameApp::CommonRes->GetQuad("c_red"); + }else if(card->hasSubtype("island")){ + mIcon = GameApp::CommonRes->GetQuad("c_blue"); + } + if (mIcon) mIcon->SetHotSpot(16,16); + if (card->isTapped()){ + renderer->FillRect(myX - myH , myY , myH, myW, ARGB(255,Constants::_r[color]/2+50,Constants::_g[color]/2+50,Constants::_b[color]/2+50)); + renderer->DrawRect(myX - myH , myY , myH, myW, ARGB(255,Constants::_r[color],Constants::_g[color],Constants::_b[color])); + mFont->SetScale(DEFAULT_MAIN_FONT_SCALE * 0.8 * mScale); + mFont->DrawString(buffer,myX - (myH)+4,myY + 1); + if (mIcon) renderer->RenderQuad(mIcon,myX - myH/2, myY + myW/2,M_PI_2,mScale,mScale); + if (tc){ + if (!tc->canTarget(card)){ + renderer->DrawRect(myX - myH , myY , myH, myW, ARGB(128,0,0,0)); + } + } + }else{ + renderer->FillRect(myX , myY , myW, myH, ARGB(255,Constants::_r[color]/2+50,Constants::_g[color]/2+50,Constants::_b[color]/2+50)); + renderer->DrawRect(myX , myY , myW, myH, ARGB(255,Constants::_r[color],Constants::_g[color],Constants::_b[color])); + mFont->SetScale(DEFAULT_MAIN_FONT_SCALE * 0.5 * mScale); + mFont->DrawString(buffer,myX+4,myY + 1); + if (mIcon) renderer->RenderQuad(mIcon,myX + myW/2, myY + myH/2,0,mScale, mScale); + if (tc){ + if (!tc->canTarget(card)){ + renderer->DrawRect(myX , myY , myW, myH, ARGB(128,0,0,0)); + } + } + } + mFont->SetScale(1.0); } + + if (tc && tc->alreadyHasTarget(card)){ + if (card->isTapped()){ + renderer->FillRect(myX- myH , myY , myH, myW, ARGB(128,255,0,0)); + }else{ + renderer->FillRect(myX , myY , myW, myH, ARGB(128,255,0,0)); + } + } + if (card->isACreature()){ mFont->SetScale(1.0); char buffer[200]; diff --git a/projects/mtg/src/GameStateMenu.cpp b/projects/mtg/src/GameStateMenu.cpp index f0904ee04..6c2ac0807 100644 --- a/projects/mtg/src/GameStateMenu.cpp +++ b/projects/mtg/src/GameStateMenu.cpp @@ -5,7 +5,7 @@ #include "../include/GameOptions.h" #include "../include/GameApp.h" -static const char* GAME_VERSION = "WTH?! 0.3.1 - by WilLoW"; +static const char* GAME_VERSION = "WTH?! 0.3.2 - by WilLoW"; #define ALPHA_WARNING 0 #define DEFAULT_ANGLE_MULTIPLIER 0.4 diff --git a/projects/mtg/src/ManaCost.cpp b/projects/mtg/src/ManaCost.cpp index 957983a52..8719ae99d 100644 --- a/projects/mtg/src/ManaCost.cpp +++ b/projects/mtg/src/ManaCost.cpp @@ -145,6 +145,11 @@ int ManaCost::getCost(int color){ return cost[color]; } +ManaCostHybrid * ManaCost::getHybridCost(unsigned int i){ + if (nbhybrids <= i) return NULL; + return hybrids[i]; +} + int ManaCost::getMainColor(){ for (int i=0; i< Constants::MTG_NB_COLORS; i++){ if (cost[i]) return i; @@ -203,7 +208,7 @@ int ManaCost::addHybrid(int c1, int v1, int c2, int v2){ hybrids[nbhybrids] = h; nbhybrids++; return nbhybrids; -} +} int ManaCost::pay(ManaCost * _cost){ ManaCost * diff = Diff(_cost);