From 8b922a490d24012ca91c5901046761a5ecc3ce77 Mon Sep 17 00:00:00 2001 From: naufaldzakiim Date: Fri, 27 Jan 2023 23:05:26 +0700 Subject: [PATCH 1/2] Importing projects --- .../nartoStormV/.idea/.gitignore | 3 + .../nartoStormV/.idea/misc.xml | 6 + .../nartoStormV/.idea/modules.xml | 8 + .../nartoStormV/nartoStormV.iml | 11 + .../production/nartoStormV/GameManager.class | Bin 0 -> 6311 bytes .../out/production/nartoStormV/Main.class | Bin 0 -> 2206 bytes .../nartoStormV/character/Shinobi.class | Bin 0 -> 5004 bytes .../nartoStormV/character/StatsEffect.class | Bin 0 -> 1123 bytes .../nartoStormV/jutsu/AttackJutsu.class | Bin 0 -> 1209 bytes .../nartoStormV/jutsu/BuffJutsu.class | Bin 0 -> 1597 bytes .../production/nartoStormV/jutsu/Jutsu.class | Bin 0 -> 643 bytes .../nartoStormV/player/HumanPlayer.class | Bin 0 -> 776 bytes .../nartoStormV/player/NonHumanPlayer.class | Bin 0 -> 879 bytes .../nartoStormV/player/Player.class | Bin 0 -> 247 bytes .../nartoStormV/src/GameManager.java | 281 ++++++++++++++++++ .../nartoStormV/src/Main.java | 63 ++++ .../nartoStormV/src/character/Shinobi.java | 162 ++++++++++ .../src/character/StatsEffect.java | 48 +++ .../nartoStormV/src/jutsu/AttackJutsu.java | 26 ++ .../nartoStormV/src/jutsu/BuffJutsu.java | 40 +++ .../nartoStormV/src/jutsu/Jutsu.java | 25 ++ .../nartoStormV/src/player/HumanPlayer.java | 28 ++ .../src/player/NonHumanPlayer.java | 33 ++ .../nartoStormV/src/player/Player.java | 8 + 24 files changed, 742 insertions(+) create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/.idea/.gitignore create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/.idea/misc.xml create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/.idea/modules.xml create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/nartoStormV.iml create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/GameManager.class create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/Main.class create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/character/Shinobi.class create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/character/StatsEffect.class create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/jutsu/AttackJutsu.class create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/jutsu/BuffJutsu.class create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/jutsu/Jutsu.class create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/player/HumanPlayer.class create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/player/NonHumanPlayer.class create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/player/Player.class create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/GameManager.java create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/Main.java create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/character/Shinobi.java create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/character/StatsEffect.java create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/jutsu/AttackJutsu.java create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/jutsu/BuffJutsu.java create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/jutsu/Jutsu.java create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/player/HumanPlayer.java create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/player/NonHumanPlayer.java create mode 100644 Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/player/Player.java diff --git a/Naufal Dzaki Imtiyaz_Undip/nartoStormV/.idea/.gitignore b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/Naufal Dzaki Imtiyaz_Undip/nartoStormV/.idea/misc.xml b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/.idea/misc.xml new file mode 100644 index 0000000..03f397c --- /dev/null +++ b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Naufal Dzaki Imtiyaz_Undip/nartoStormV/.idea/modules.xml b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/.idea/modules.xml new file mode 100644 index 0000000..2405c69 --- /dev/null +++ b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Naufal Dzaki Imtiyaz_Undip/nartoStormV/nartoStormV.iml b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/nartoStormV.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/nartoStormV.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/GameManager.class b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/GameManager.class new file mode 100644 index 0000000000000000000000000000000000000000..bb9c65410ae78f85f19d03c3d031cf90bc5cf8e9 GIT binary patch literal 6311 zcmdT|3wRXO75?w+Cc8-{30Vk=C@g}K1d;$!qy*&=!GtD&Y>a{roNPw2WV5@@&hn_w zR`7)neBq={nT`+!3j|VeW3_3eIek;FycDe~LOF&8aFC9JF-)MO?`PU%w6_bC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BabAyJnp#YyiH+NJ`w7N&h@VMZ{XeY>P<2fzV5-1SDq)~;NP#D8#Mu8UX{E| zUbib>lT5ce8p`wh?LD|ONk>lOqM%^=41ax;o;{pBr4<8{Dky-i1xvuiQJoI==_s_Mh>e%(4gm8(B7+RRDBV zkj^UOvL}$ukHbrd;AOO84^Cw`E~OjNcopaH$Z$ShXYRd$+wmrY>@D1lcXG0++jA?r zsmIwYb-Qj2G8bQ>Rv+gXkWCW;*yLpskG!r|dz@^--mF&x^y-vss_dcZ@=s>UNM04Z z+IiikGNtYRK2zp#w+y^TaNg%0`U8UV5zFq!EVqASvHpa9`Vj0=Aq|pQGj=tA6{lOWV2vRw)a@J2kgy4xHk*o-YkS~xDb}&mHwF_A>s-={ulrN literal 0 HcmV?d00001 diff --git a/Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/Main.class b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..198bb4daa1742b70e5e90a5a6ba52a694d26a4cf GIT binary patch literal 2206 zcmZuyxpNy;9R8kUdsk~&+W1N~pD*}gHQVwi~Bu*qJM8Sy@uC=t5)|Pj}YL&#{ zYG?vI1^)pvG&FI7XBdVK8VZJr3K}X3hJv91zV}v69OEtC{;v0Xzw3MN`+vUr8o(KR zXds5ThPEWy(IH?i*mvw~-S(>4%X14(ITYwP>3VK>S|FYooY9~QY$@05z%GYQkS*0* z&!2O37&M%=gJ$R((2$hwx&*dn3QrxD!oc;a`KhVF869cbm+VG!(b2JmbkVNRr;Z+h z_RDi_=xgZXNej)e(aesApx~le!gY5Lm*kI z*%klpz+~O`90L}1$+&h4SewQbMYcyEQL?MfK+&%-xP1cJWX-Mk0kb?HbxfXl*q)B( zsVg-bw&(jg2B|ye2F}2QU9amH7U(+bH|Oefgm+YmcD@&A3;sv}YVALHu z@Knq!KjTsvD?TsleORDJ)vy`5_3U^M*vkdC5gHgnyc0)pOvCXcP9P_cdTJ+4*fG0O z5$Ic=Y}D2K;7tuD1-ft7?Pa#{LUYOXt|(duTirR%5g54El!+S1<7HX5@eQt8{ggpY zQq^)b?R)FI8JLK|JeS0ITwq95hk^BFrUutdMk}aJT*M^}g(QlYX8Bqkqqx}Oa?SS} z&g9zg3G`(d{4S}|z?Rxx8a;kW4!S$T! z=F*%KT(dbNY(>E@+w~dFmgHN)wy@?lh>n8XoagQ(<)lAzYhCr8^nrRisM5Y?6E(ef z3ZGPOQZ=d@3XUX}6c#zGM0V&CZb1uf?8!6p$!azf!W6)0*kFw%Y>10;gc(_fHNa5X zh|ogQc|t`Zg($5km_#Vysf!XKEdP_%Hlk@Zqns5Eq=fa*qJ9uY=?%Sjq8sCwJX_l3 z+iT@Lu)*WWO$u|G#~3BQ8I+xKu5467_TrF)8us9IUZ3)dfq|og>zm}V{0siuhgKlI zRO+|5N;Qzc+gy{80c^}ESs4{dxH{`)O|) zN}o`IgWSL!a)Y5ZWX!agmIrhycE}tv$0VCn<|F1Vnp3|s*EMXlKg6M7t3$0C*AYus zYeKCC*HJ5}Rw)^^q{M2oI-{SIk?Z1b6=Sn2cqx~%Qp1mNB!=r&YGjQVT_dcvh+0K{ zw)@ly&g9aonBc~XMg)Zzs3PVWq?(N0}^xy^`BNu(RhkiW3R(ytS_?(Z9n97k46U`!PG9?amVsNtBn z&pZDkoDv`7v>K@|qOpO4dB&I$@1u$uhiZrL8CQ)nIwWi?kc#7kxQazmZM>5wQO6Re z_l7tOk5mU-u@^om4fjM3Zj;jSK*aD4sRZ--0|6<6+5L(JsZQqjBSKP1X8J9fq`DZt mhda2-NQ#W`9+vs&&)^8|lQQwHs-tLGy~kP#yiZvSAN&Vw^7~T& literal 0 HcmV?d00001 diff --git a/Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/character/Shinobi.class b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/character/Shinobi.class new file mode 100644 index 0000000000000000000000000000000000000000..981f0ecdc6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$K^fS30lXMYH@!YV;J|4_AvopVJdQd+HExc4RA<# zYga*4#dgxilo+N({lr>bKNIz|kDRC{M7?PmrWKlT+`z1dIUn;_P{sENGW^iOLe2(dU&h+*GJJ5czF=ZXV^A!}P|9KI`cGMmw}TAEgCnervZcM~M38 z7>ZMPxP1l1&f%%4+ceR?<>PJS6})3(C6~gDLh-+JiRn8&?qNwGL(>S2fMF?xVl|EX zc;KPnqll8ibid$g%bH`;VTM<_*)=;2=|^=iMQl+?<6XSx;h~Q*-dC7$F|Ja>rd|k9 z46-_;soxI(k4mh>iLQoWst@szhmU=Hf=}6o`ibu7x-}h+hqmFfMuYUQ)1k3j7n`PO zwL+4p_r>vZA76;qByS_qorPRge5}gV6t80bWADWwaI5@^`;5HNJ|gi`wV-9TyXS|d z^Q}H?Qj@E->$&+52V^j zLE!>Fl-A=eXKsY=Ji(POl+uViK)3V7aZf?<;jeLB=jjJprnoPZR&M_aRl0KtuQZ#y zM5Z)5dWq~$&hs(XIeLK+Qphm!B&Hd69$9=z?RpdgPw8NHapD77itXZx5Z1#7vS)huO!jOKkNQD#j`Sst$TAyupDlUd Wg3m<(-n4HKUt^o$6?Po|yZ-=BN<;zx literal 0 HcmV?d00001 diff --git a/Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/jutsu/Jutsu.class b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/jutsu/Jutsu.class new file mode 100644 index 0000000000000000000000000000000000000000..a2f4f89437eaddb0029b7076bc4a06f5ae11e612 GIT binary patch literal 643 zcmZWm%TC)+5Itj@m^coh;ZdNxx=VtDKOm?qqE@1cU=b9l%Nt`7r@^W0Yoz{D7a)Nu zb-@SpqpF^JiPWf(<#~C|nKR?xe}26HILEOM2P+=j040l1aa!l_C};ni>wM_N!m zOVUJt5Uey?g9=tr@!$ujA`nz3h0crcv#|ml<@-CPD-v{<<{cET)D(}Btolh2E;9w)h=)?3ij z5qP6mUs_$8&DQcD0@%=9ki<19%DYMOZ&USMuv+Bte8IhDkK!{G={O7fTIu}b?JbYg zF>3w(tjMDHQ(_eQ7IA70;lAhc4zKO-;ni%!OVF1feBaPEn0+z7g1+AV32C1^!)xz9 zqxNV48?+6$v=v&Pwu&{9ZL)Iw3d0t*nUTPb5gVC74hOu&&U{QrZ@!hgwD@NlYxc1{e@WwLO6}%%g==X8Je!-zd9sLEZb8fZ( literal 0 HcmV?d00001 diff --git a/Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/player/HumanPlayer.class b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/player/HumanPlayer.class new file mode 100644 index 0000000000000000000000000000000000000000..f52001e0a7955c99f5ea50911b7e2d6bd6b8819a GIT binary patch literal 776 zcmZuvT}$IY6g`tRiLI%v{c?A8KYVMuu=xQMeGry?C@OU6`!o*iNSa8R3jQmFl?5OC z0sg3E&xB~jl)#;PhjY%o=T4sgJw5?A!C@5^N-oMCY&ZgqD|sXRP)0NVe0rsVRKPjX zkxq{VO1=K1f-O{BR6T6N6KGzC@>V7Ouhl|E7g;W_yHp{W>hg3h6UihIXpMrG!XM9d z6i@ZgXzh5Yqajd^(wF9ioe7IaDx@&PMWQe96hjxh==Iao29l&kW9Iv(egx^XkIMmStRg ICCt;K2Sh7T@xC}KaAfSrm`M4nRB99{ z5B-3CRMlCRB%~lq$9s85~!WaOBuv6nFe1c=PJwv ztWQxATF)T5nIy39g#8tJW?PhJ10ox)qXV}KeM4Sh+x zWyZa|CE zYXGe^LFETQukmI}v;BYb;nwCOdic+w6OPjQEWL^S=!^bmz!7B}t!-gFY+)6?>n+|9 HXW;!`IUbuj literal 0 HcmV?d00001 diff --git a/Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/player/Player.class b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/out/production/nartoStormV/player/Player.class new file mode 100644 index 0000000000000000000000000000000000000000..25a338c2d04e142b7e9c6fca2ee9082b8de5cd2d GIT binary patch literal 247 zcmZvX%?`mp6ot>UbSMoAJVU$D2e7b^SP7Cz?58#9PpTuMBwo$J19&KLTM-sE_wRf+ z_uR+xb_Xzr$6+ye$3k9}3Aat+XfX_Pd68iu%Ou=Hxr!?Wo~UXq4~k*r2dl3xDwCDT zjK%~ARS>N9i&Pp(g<%*I9e>(Tq*jPOC6YJE~a players; + private boolean isEndGame = false; + + private GameManager() { + this.players = new ArrayList<>(); + this.players.add(null); + this.players.add(null); + } + + public static GameManager getInstance() { + if (instance == null) { + instance = new GameManager(); + } + return instance; + } + + public void registerPlayer(Player player1, Player player2) { + this.players.set(0, player1); + this.players.set(1, player2); + } + + // Start battle game + public void startGame() { + int match = 1; + Player player1 = this.players.get(0); + Player player2 = this.players.get(1); + System.out.println("Game Start!"); + System.out.println(player1.getName() + " character : " + player1.getSelectedCharacter().getName()); + System.out.println("VS"); + System.out.println(player2.getName() + " character : " + player2.getSelectedCharacter().getName()); + + while (!isEndGame) { + delay(1500); + System.out.println("====================================="); + System.out.println(); + System.out.println("Match " + match); + System.out.println(); + + delay(1500); + + System.out.println("-------------------------------------"); + System.out.println(); + System.out.println(player1.getName() + " character status : "); + player1.getSelectedCharacter().status(); + delay(1500); + System.out.println(player2.getName() + " character status : "); + player2.getSelectedCharacter().status(); + System.out.println("-------------------------------------"); + + delay(1500); + + System.out.println(); + System.out.println(player1.getName() + " turn"); + + if (player1 instanceof HumanPlayer) { + chooseMoveHuman(player1, player2); + } + else { + delay(2500); + chooseMoveComputer(player1, player2); + } + + if (player2.getSelectedCharacter().getHp() <= 0) { + System.out.println(player2.getName() + " loses"); + System.out.println(player1.getName() + " wins"); + endGame(); + break; + } + if (player1.getSelectedCharacter().getHp() <= 0) { + System.out.println(player1.getName() + " loses"); + System.out.println(player2.getName() + " wins"); + endGame(); + break; + } + + System.out.println(); + delay(1500); + System.out.println("-------------------------------------"); + System.out.println(); + System.out.println(player1.getName() + " character status : "); + player1.getSelectedCharacter().status(); + delay(1500); + System.out.println(player2.getName() + " character status : "); + player2.getSelectedCharacter().status(); + System.out.println("-------------------------------------"); + + delay(1500); + + System.out.println(); + System.out.println(player2.getName() + " turn"); + + if (player2 instanceof HumanPlayer) { + chooseMoveHuman(player2, player1); + } + else { + delay(2500); + chooseMoveComputer(player2, player1); + } + + if (player1.getSelectedCharacter().getHp() <= 0) { + System.out.println(player1.getName() + " loses"); + System.out.println(player2.getName() + " wins"); + endGame(); + break; + } + if (player2.getSelectedCharacter().getHp() <= 0) { + System.out.println(player2.getName() + " loses"); + System.out.println(player1.getName() + " wins"); + endGame(); + break; + } + + match++; + + System.out.println(); + } + + } + + // State game over + private void endGame(){ + this.isEndGame = true; + System.out.println("Game Over"); + } + + // Move list player human + private void chooseMoveHuman(Player human, Player opponent) { + Scanner input1 = new Scanner(System.in); + System.out.println("Move list : "); + System.out.println("1. Basic Attack"); + System.out.println("2. Jutsu"); + System.out.println("3. Chakra Recovery"); + System.out.println("4. Surrender"); + System.out.println("Choose your move: "); + int move = input1.nextInt(); + switch (move) { + case 1: + System.out.println(human.getSelectedCharacter().getName() + " uses basic attack"); + human.getSelectedCharacter().basicAttack(opponent.getSelectedCharacter()); + break; + + case 2: + chooseJutsuHuman(human, opponent); + break; + + case 3: + System.out.println(human.getSelectedCharacter().getName() + " healing chakra"); + human.getSelectedCharacter().healChakra(); + break; + + case 4: + System.out.println(human.getName() + " surrenders"); + System.out.println(opponent.getName() + " wins"); + endGame(); + break; + + default: + break; + } + } + + // Pick jutsu player human + private void chooseJutsuHuman(Player human, Player opponent) { + Scanner input2 = new Scanner(System.in); + System.out.println("Jutsu list : "); + System.out.println("0. Back"); + human.getSelectedCharacter().showMasteredJutsu(); + Jutsu jutsu; + System.out.println("Choose your jutsu : "); + int choice = input2.nextInt(); + switch (choice) { + case 0: + chooseMoveHuman(human, opponent); + break; + + case 1: + jutsu = human.getSelectedCharacter().pickMasteredJutsu(choice-1); + System.out.println(human.getSelectedCharacter().getName() + " casts " + jutsu.getName()); + human.getSelectedCharacter().castJutsu(jutsu, opponent.getSelectedCharacter()); + break; + + case 2: + jutsu = human.getSelectedCharacter().pickMasteredJutsu(choice-1); + System.out.println(human.getSelectedCharacter().getName() + " casts " + jutsu.getName()); + human.getSelectedCharacter().castJutsu(jutsu, opponent.getSelectedCharacter()); + break; + + case 3: + jutsu = human.getSelectedCharacter().pickMasteredJutsu(choice-1); + System.out.println(human.getSelectedCharacter().getName() + " casts " + jutsu.getName()); + human.getSelectedCharacter().castJutsu(jutsu, opponent.getSelectedCharacter()); + break; + + default: + break; + } + } + + // Move list player computer + private void chooseMoveComputer(Player computer, Player opponent) { + Random rand = new Random(); + int move = rand.nextInt(3) + 1; + switch (move) { + case 1: + System.out.println(computer.getSelectedCharacter().getName() + " uses basic attack"); + computer.getSelectedCharacter().basicAttack(opponent.getSelectedCharacter()); + break; + + case 2: + chooseJutsuComputer(computer, opponent); + break; + + case 3: + System.out.println(computer.getSelectedCharacter().getName() + " healing chakra"); + computer.getSelectedCharacter().healChakra(); + break; + + case 4: + System.out.println(computer.getName() + " surrenders"); + System.out.println(opponent.getName() + " wins"); + endGame(); + break; + + default: + break; + } + } + + // Pick jutsu untuk player computer + private void chooseJutsuComputer(Player computer, Player opponent) { + Random rand = new Random(); + Jutsu jutsu; + int choice = rand.nextInt(4); + switch (choice) { + case 0: + chooseMoveComputer(computer, opponent); + break; + + case 1: + jutsu = computer.getSelectedCharacter().pickMasteredJutsu(choice-1); + System.out.println(computer.getSelectedCharacter().getName() + " casts " + jutsu.getName()); + computer.getSelectedCharacter().castJutsu(jutsu, opponent.getSelectedCharacter()); + break; + + case 2: + jutsu = computer.getSelectedCharacter().pickMasteredJutsu(choice-1); + System.out.println(computer.getSelectedCharacter().getName() + " casts " + jutsu.getName()); + computer.getSelectedCharacter().castJutsu(jutsu, opponent.getSelectedCharacter()); + break; + + case 3: + jutsu = computer.getSelectedCharacter().pickMasteredJutsu(choice-1); + System.out.println(computer.getSelectedCharacter().getName() + " casts " + jutsu.getName()); + computer.getSelectedCharacter().castJutsu(jutsu, opponent.getSelectedCharacter()); + break; + + default: + break; + } + } + + // Delay untuk animasi interaktif pada CLI + private void delay(int ms) { + try { + Thread.sleep(ms); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + +} diff --git a/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/Main.java b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/Main.java new file mode 100644 index 0000000..71a800c --- /dev/null +++ b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/Main.java @@ -0,0 +1,63 @@ +import java.util.ArrayList; +import java.util.List; +import java.util.Scanner; + +import character.*; +import jutsu.*; +import player.*; + +public class Main { + public static void main(String[] args) { + // Creating Characters Sets + Shinobi naruto = new Shinobi("Naruto", 10, 10); + Shinobi sasuke = new Shinobi("Sasuke", 10, 10); + Shinobi madara = new Shinobi("Madara", 10, 10); + Shinobi obito = new Shinobi("Obito", 10, 10); + + // Creating Jutsu Sets + Jutsu rasengan = new AttackJutsu("Rasengan", 20, 20); + Jutsu shadowClone = new BuffJutsu("Shadow Clone", 25, 0, 5, 5); + Jutsu sageMode = new BuffJutsu("Sage Mode", 50, 0, 20, 0); + Jutsu chidori = new AttackJutsu("Chidori", 20, 20); + Jutsu sharingan = new BuffJutsu("Sharingan", 25, 0, 10, 0); + Jutsu susanoo = new BuffJutsu("Susanoo", 50, 0, 0, 20); + Jutsu fireBall = new AttackJutsu("Fire Ball", 15, 15); + Jutsu doubleMeteor = new AttackJutsu("Double Meteor", 50, 50); + Jutsu kamui = new BuffJutsu("Kamui", 30, 0, 0, 15); + + // Learning Jutsu + naruto.learnJutsu(rasengan); + naruto.learnJutsu(shadowClone); + naruto.learnJutsu(sageMode); + sasuke.learnJutsu(chidori); + sasuke.learnJutsu(sharingan); + sasuke.learnJutsu(susanoo); + madara.learnJutsu(doubleMeteor); + madara.learnJutsu(sharingan); + madara.learnJutsu(susanoo); + obito.learnJutsu(fireBall); + obito.learnJutsu(sharingan); + obito.learnJutsu(kamui); + + // Load Characters + List charactersList = new ArrayList(); + charactersList.add(naruto); + charactersList.add(sasuke); + charactersList.add(madara); + charactersList.add(obito); + + // Creating Players + Player player1 = new HumanPlayer("Alan Turing"); + Player player2 = new NonHumanPlayer(); + + // Choose Character + player1.chooseCharacter(charactersList.get(0)); + player2.chooseCharacter(charactersList.get(1)); + + // Register Players + GameManager.getInstance().registerPlayer(player1, player2); + + // Start Game + GameManager.getInstance().startGame(); + } +} diff --git a/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/character/Shinobi.java b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/character/Shinobi.java new file mode 100644 index 0000000..0af0670 --- /dev/null +++ b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/character/Shinobi.java @@ -0,0 +1,162 @@ +package character; + +import java.util.ArrayList; +import java.util.List; +import jutsu.*; + +// Class character set +public class Shinobi { + private String name; + private int hp; + private int chakra; + private int attack; + private int defense; + private List masteredJutsu = new ArrayList(); + + public Shinobi(String name, int attack, int defense) { + this.name = name; + this.hp = 100; + this.chakra = 100; + this.attack = attack; + this.defense = defense; + } + + public String getName() { + return name; + } + + public int getHp() { + return hp; + } + + public int getChakra() { + return chakra; + } + + public int getAttack() { + return attack; + } + + public int getDefense() { + return defense; + } + + public void setName(String name) { + this.name = name; + } + + public void setHp(int hp) { + this.hp = hp; + } + + public void setChakra(int chakra) { + this.chakra = chakra; + } + + public void setAttack(int attack) { + this.attack = attack; + } + + public void setDefense(int defense) { + this.defense = defense; + } + + // Status dari character + public void status() { + System.out.println("Name: " + name); + System.out.println("HP: " + hp + "/100"); + System.out.println("Chakra: " + chakra + "/100"); + System.out.println("Attack: " + attack); + System.out.println("Defense: " + defense); + System.out.println(); + } + + // Memberikan damage pada lawan + private void attack(Shinobi enemy, int attackDmg) { + int damageDealt = attackDmg - (enemy.getDefense()/2); + enemy.takeDamage(damageDealt); + System.out.println(enemy.getName() + " takes " + damageDealt + " damage from " + name); + } + + // Menerima damage dari lawan + private void takeDamage(int damage) { + setHp(getHp() - damage); + } + + // Menyerang lawan dengan basic attack + public void basicAttack(Shinobi enemy) { + attack(enemy, attack); + } + + // Mengisi ulang chakra + public void healChakra() { + this.chakra += 25; + System.out.println(name + " heals 25 chakra"); + if(chakra > 100) { + chakra = 100; + } + } + + // Menambah jutsu yang dikuasai + public void learnJutsu(Jutsu jutsu) { + masteredJutsu.add(jutsu); + } + + // Mengambil jutsu dari jutsu-jutsu yang dikuasai + public Jutsu pickMasteredJutsu(int index) { + return masteredJutsu.get(index); + } + + // Mengirim seluruh jutsu yang dikuasai + public List getMasteredJutsu() { + return masteredJutsu; + } + + // Menampilkan daftar jutsu yang dikuasai + public void showMasteredJutsu() { + for(int i = 0; i < masteredJutsu.size(); i++) { + System.out.println((i+1) + ". " + masteredJutsu.get(i).getName()); + } + } + + // Mengaktifkan jutsu, semua tipe jutsu dapat digunakan karena adanya adaptor StatsEffect + public void castJutsu(Jutsu jutsu, Shinobi enemy) { + StatsEffect effect = new StatsEffect(); + jutsu.useJutsu(effect); + if(this.chakra < jutsu.getChakraCost()) { // Gagal aktifkan jutsu karena chakra tidak cukup + System.out.println("Not enough chakra!"); + } + + else { + System.out.println(name + " uses " + jutsu.getName() + "!"); + System.out.println("Jutsu cost " + jutsu.getChakraCost() + " chakra"); + System.out.println(); + this.chakra -= jutsu.getChakraCost(); + + if(effect.getHpDelta() > 0) { // Jutsu ngebuff HP + System.out.println(name + " heals " + effect.getHpDelta() + " amounts of HP"); + this.hp += effect.getHpDelta(); + + if(hp > 100) { + hp = 100; + } + } + + if(effect.getAttackDelta() > 0){ // Jutsu ngebuff attack + System.out.println(name + " increases attack by " + effect.getAttackDelta()); + this.attack += effect.getAttackDelta(); + } + + if(effect.getDefenseDelta() > 0) { // Jutsu ngebuff defense + System.out.println(name + " increases defense by " + effect.getDefenseDelta()); + this.defense += effect.getDefenseDelta(); + } + + if(effect.getDamage() > 0) { // Jutsu menyerang lawan dan memberikan damage + attack(enemy, effect.getDamage()); + } + + } + + } +} diff --git a/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/character/StatsEffect.java b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/character/StatsEffect.java new file mode 100644 index 0000000..94180de --- /dev/null +++ b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/character/StatsEffect.java @@ -0,0 +1,48 @@ +package character; + +// Adaptor untuk class Jutsu agar bisa digunakan class Shinobi +public class StatsEffect { + private int hpDelta; + private int attackDelta; + private int defenseDelta; + private int damage; + + public StatsEffect() { + this.hpDelta = 0; + this.attackDelta = 0; + this.defenseDelta = 0; + this.damage = 0; + } + + public int getHpDelta() { + return hpDelta; + } + + public int getAttackDelta() { + return attackDelta; + } + + public int getDefenseDelta() { + return defenseDelta; + } + + public int getDamage() { + return damage; + } + + public void setHpDelta(int hpDelta) { + this.hpDelta = hpDelta; + } + + public void setAttackDelta(int attackDelta) { + this.attackDelta = attackDelta; + } + + public void setDefenseDelta(int defenseDelta) { + this.defenseDelta = defenseDelta; + } + + public void setDamage(int damage) { + this.damage = damage; + } +} diff --git a/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/jutsu/AttackJutsu.java b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/jutsu/AttackJutsu.java new file mode 100644 index 0000000..6a3f28e --- /dev/null +++ b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/jutsu/AttackJutsu.java @@ -0,0 +1,26 @@ +package jutsu; + +import character.StatsEffect; + +// Jutsu menyerang memberi damage pada lawan +public class AttackJutsu extends Jutsu{ + private int damage; + + public AttackJutsu(String name, int chakraCost, int damage) { + super(name, chakraCost); + this.damage = damage; + } + + public int getDamage() { + return damage; + } + + public void display() { + System.out.printf("Jutsu Name: %s\nChakra Cost: %d\nDamage: %d\n", getName(), getChakraCost(), damage); + } + + @Override + public void useJutsu(StatsEffect effect) { + effect.setDamage(damage); + } +} diff --git a/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/jutsu/BuffJutsu.java b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/jutsu/BuffJutsu.java new file mode 100644 index 0000000..a8e2301 --- /dev/null +++ b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/jutsu/BuffJutsu.java @@ -0,0 +1,40 @@ +package jutsu; + +import character.StatsEffect; + +// Jutsu dengan efek memberi buff pada pengguna +public class BuffJutsu extends Jutsu { + private int buffHP; + private int buffAttack; + private int buffDefense; + + public BuffJutsu(String name, int chakraCost, int buffHP, int buffAttack, int buffDefense) { + super(name, chakraCost); + this.buffHP = buffHP; + this.buffAttack = buffAttack; + this.buffDefense = buffDefense; + } + + public int getBuffHP() { + return buffHP; + } + + public int getBuffAttack() { + return buffAttack; + } + + public int getBuffDefense() { + return buffDefense; + } + + public void display() { + System.out.printf("Jutsu Name: %s\nChakra Cost: %d\nBuff HP: %d\nBuff Attack: %d\nBuff Defense: %d\n", getName(), getChakraCost(), buffHP, buffAttack, buffDefense); + } + + @Override + public void useJutsu(StatsEffect effect) { + effect.setHpDelta(buffHP); + effect.setAttackDelta(buffAttack); + effect.setDefenseDelta(buffDefense); + } +} diff --git a/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/jutsu/Jutsu.java b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/jutsu/Jutsu.java new file mode 100644 index 0000000..336ab6e --- /dev/null +++ b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/jutsu/Jutsu.java @@ -0,0 +1,25 @@ +package jutsu; + +import character.StatsEffect; + +public abstract class Jutsu { + private String name; + private int chakraCost; + + public Jutsu(String name, int chakraCost) { + this.name = name; + this.chakraCost = chakraCost; + } + + public String getName() { + return name; + } + + public int getChakraCost() { + return chakraCost; + } + + public abstract void display(); + + public abstract void useJutsu(StatsEffect effect); +} diff --git a/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/player/HumanPlayer.java b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/player/HumanPlayer.java new file mode 100644 index 0000000..76cdddc --- /dev/null +++ b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/player/HumanPlayer.java @@ -0,0 +1,28 @@ +package player; +import character.Shinobi; + +// Player manusia +public class HumanPlayer implements Player { + private Shinobi selectedCharacter; + private String name; + + public HumanPlayer(String name) { + this.selectedCharacter = null; + this.name = name; + } + + @Override + public String getName() { + return this.name; + } + + @Override + public Shinobi getSelectedCharacter() { + return this.selectedCharacter; + } + + @Override + public void chooseCharacter(Shinobi selectedCharacter) { + this.selectedCharacter = selectedCharacter; + } +} diff --git a/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/player/NonHumanPlayer.java b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/player/NonHumanPlayer.java new file mode 100644 index 0000000..857867f --- /dev/null +++ b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/player/NonHumanPlayer.java @@ -0,0 +1,33 @@ +package player; +import character.Shinobi; + +// Player bukan manusia / computer +public class NonHumanPlayer implements Player { + private Shinobi selectedCharacter; + private String name; + + public NonHumanPlayer() { + this.selectedCharacter = null; + this.name = "Computer"; + } + + public NonHumanPlayer(String name) { + this(); + this.name = name; + } + + @Override + public String getName() { + return this.name; + } + + @Override + public Shinobi getSelectedCharacter() { + return this.selectedCharacter; + } + + @Override + public void chooseCharacter(Shinobi selectedCharacter) { + this.selectedCharacter = selectedCharacter; + } +} diff --git a/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/player/Player.java b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/player/Player.java new file mode 100644 index 0000000..4188484 --- /dev/null +++ b/Naufal Dzaki Imtiyaz_Undip/nartoStormV/src/player/Player.java @@ -0,0 +1,8 @@ +package player; +import character.Shinobi; + +public interface Player{ + String getName(); + Shinobi getSelectedCharacter(); + void chooseCharacter(Shinobi selectedCharacter); +} From 83d175797c89b077ad081fe28a9a050b810c2cd7 Mon Sep 17 00:00:00 2001 From: Naufal Dzaki Imtiyaz <99311065+naufaldzakiim@users.noreply.github.com> Date: Fri, 27 Jan 2023 23:41:10 +0700 Subject: [PATCH 2/2] Create README.md --- Naufal Dzaki Imtiyaz_Undip/README.md | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Naufal Dzaki Imtiyaz_Undip/README.md diff --git a/Naufal Dzaki Imtiyaz_Undip/README.md b/Naufal Dzaki Imtiyaz_Undip/README.md new file mode 100644 index 0000000..7b68442 --- /dev/null +++ b/Naufal Dzaki Imtiyaz_Undip/README.md @@ -0,0 +1,48 @@ +# Game CLI Based Narto Storm V + +## Pejelasan Program +### Deskripsi Program +- Program ini merupakan sebuah game battle sederhana yang berbasi CLI dengan menggunakan bahasa Java. +- User dapat melakukan set player sebagai human ataupun computer. +- Jika player human maka user akan bermain pada game dan melakukan input untuk memberikan aksi pada game. +- Jika player computer maka aksi player tersebut akan dilakukan otomatis oleh sistem. +- Pertarungan yang dapat dilakukan hanya terbatas 2 player saja. +- Dan bisa untuk seluruh player adalah human maupun seluruh player adalah computer. + +### Penerapan Konsep OOP +- Inheritance terimplementasikan pada kelas yang memiliki ragam seperti pada kelas Jutsu yang memiliki child class yaitu AttackJutsu dan BuffJutsu. +- Polimorfisme terimplementasikan pada saat membuat instance sebuah Jutsu dan Player. +- Interface terimplementasikan pada interface Player yang nantinya akan diimplemen oleh kelas HumanPlayer dan NonHumanPlayer. + +### Penerapan Prinsip SOLID +- Single responsibility Principle +Prinsip ini terimplementasi dimana untuk satu kelas hanya menangani satu tugas saja. Tidak terdapat satu kelas dewa yang menangani semua urusan. +- Open-closed Principle +Prinsip ini terimplementasi dimana untuk menambahkan jenis jutsu yang lain misal UltimateJutsu, kita tidak perlu melakukan modifikasi, cukup lakukan ekstensi dari kelas abstrak Jutsu. +- Dependency Inversion Principle +Prinsip ini terimplementasi dimana untuk kelas yang dependent terhadap kelas lain, ia tidak bergantung pada kelas yang konkrit melainkan sebuah kelas abstrak atau interface. +Seperti pada kelas Shinobi yang dependent terhadap kelas abstrak Jutsu. Serta kelas GameManager yang dependenet terhadap interface Player. + +### Penjelasan design pattern yang dipilih +- Disini design pattern yang dipilih adalah **Singleton** dimana terdapat pada class GameManager. +Class tersebut hanya bisa diinstansiasi sebanyak satu kali dan itu berfungsi untuk memulai pertarungan. +Alasan pemilihan design tersebut karena jika terdapat banyak objek dengan kelas tersebut akan sia-sia dan boros resource. Satu saja sudah cukup. +- Kemudian design pattern yang dipilih adalah **Adaptor** +Implementasi tersebut terletak pada kelas StatsEffect dimana merupakan sebuah adaptor untuk kelas Jutsu untuk bisa digunakan oleh kelas Shinobi. +Alasan pemilihan design pattern tersebut adalah agar semua jenis Jutsu hasil turunan dari kelas Jutsu dapat diterima oleh kelas Shinobi +dan tidak memerlukan modifikasi melainkan cukup lakukan ekstensi dari kelas Jutsu. + + +## Cara Menjalankan Program +1. Clone repository +2. Buka project pada folder yang sudah di clone tadi menggunakan IDE Intellij IDEA (untuk IDE atau text editor lain tidak terjamin aman) +3. Buka file Main.java +4. Lakukan set player 1 dan player 2 ingin sebagai human player atau computer player +5. Pilih karakter dengan memasukkan index list karakter yang sudah disediakan di atas +6. Jalankan program Main.java +7. Selamat bertarung + +## Versi Bahasa dan Dependency +Program ditulis menggunakan bahasa Java 19.0.2 dan menggunakan IDE Intellij IDEA. + +Kalau dibuka menggunakan VSC entah mengapa terdapat trouble pada saat mengambil inputan dari user.