<?xml version="1.0" encoding="UTF-8" ?><rdf:RDF 
  xmlns="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xml:lang="ja">
  <channel rdf:about="http://w.atwiki.jp/memoyoushi/">
    <title>memoyoushi @ ウィキ</title>
    <link>http://w.atwiki.jp/memoyoushi/</link>
    <atom:link href="https://w.atwiki.jp/memoyoushi/rss10.xml" rel="self" type="application/rss+xml" />
    <atom:link rel="hub" href="https://pubsubhubbub.appspot.com" />
    <description>memoyoushi @ ウィキ</description>

    <dc:language>ja</dc:language>
    <dc:date>2017-11-28T10:27:13+09:00</dc:date>
    <utime>1511832433</utime>

    <items>
      <rdf:Seq>
                <rdf:li rdf:resource="https://w.atwiki.jp/memoyoushi/pages/15.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/memoyoushi/pages/14.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/memoyoushi/pages/13.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/memoyoushi/pages/12.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/memoyoushi/pages/1.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/memoyoushi/pages/2.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/memoyoushi/pages/3.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/memoyoushi/pages/4.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/memoyoushi/pages/5.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/memoyoushi/pages/6.html" />
              </rdf:Seq>
    </items>
	
		
    
  </channel>
    <item rdf:about="https://w.atwiki.jp/memoyoushi/pages/15.html">
    <title>CPP完成</title>
    <link>https://w.atwiki.jp/memoyoushi/pages/15.html</link>
    <description>
      #include&lt;stdio.h&gt;
#include&lt;string.h&gt;
#include&lt;windows.h&gt;
#include&lt;string&gt;
#include&lt;iostream&gt;
#include&lt;stdlib.h&gt;
#include&lt;time.h&gt;




char x = 66;
char y = 66;
char x2=19;
char x3 = 11;
char z = 1;
char q=1;
char w = 1;
char y2 = 19;
char y3 = 11;
char menu = 1;
char menu2 = 1;
char shop = 1;
int money = 100;
char item ;
int MENU;
int MENU2;
char SHOP;
int yakusou=0;
int kimera=0;
int HP=15;
int ATK=5;
int DEF=5;
int EXP=0;
int LV=1;
int enemyHP=3;
int enemyATK=7;
int enemyDEF=4;
int battle;
int battle2;
int battle3;
int nigeru;
int s = 0;
int i = 5;
int s2 = 0;
int MENU3;
int menu3 = 1;
int bossHP = 10;
int bossATK = 17;
int bossDEF = 6;
int last = 0;











using namespace std;


int main() {


        //フィールドマップ


        char str[1000];


        string map;


        map = &quot;MwwwwwwwwwwwwT\nMwwwwwwwwwwwww\nMwwwwwwwwwwwww\nMwwwwwwwwwwwww\nMwwwwwwwwwwwww\nMwwwwwwwwwwwww\nMwwwwwwwwwwwww\nMwwwwwwwwwwwww\nMCwwwwwwwwwwww\n&quot;;




        map[x] = &#039;A&#039;;
        strcpy(str, map.c_str());
        printf(&quot;%s\n&quot;, str);


        //町マップ


        char str2[1000];


        string map2;


        map2 = &quot;EEEEEEE\nEllSllE\nElllllE\nEEEoEEE\n&quot;;


//城マップ
char str3[1000];


string map3;


map3=
&quot;EEEoEEE\nElllllE\nEllBllE\nEEEEEEE\n&quot;;


        char up = 0;
        char left = 0;
        char right = 0;
        char down = 0;


        while (1) {


                //フィールド用処理
                while (z == 1) {


                        //フィールドメニュー
                        if (GetAsyncKeyState(VK_ESCAPE) &amp; 0x8000)
                        {
                                Sleep(300);
                                system(&quot;cls&quot;);
                                printf(&quot;メニュー\n\n&quot;);
                                printf(&quot;1 持ち物\n2 ステータス\n3 とじる\n\nどれを開きますか? ＞&quot;);
                                Sleep(300);
                                scanf(&quot;%d&quot;, &amp;MENU);
                                //持ち物
                                if (MENU == 1) {
                                        
                                        system(&quot;cls&quot;);
                                        if (yakusou == 0 &amp;&amp; kimera == 0) { printf(&quot;持ち物はありません&quot;); }
                                        if (yakusou != 0) { printf(&quot;1 薬草x%d\n&quot;, yakusou); }
                                        if (kimera != 0) { printf(&quot;2 キメラのつばさx%d\n&quot;, kimera); }
                                        if (yakusou != 0 || kimera != 0) {
                                                printf(&quot;3 なにもつかわない\n\n&quot;);
                                                printf(&quot;なにをつかいますか？ ＞&quot;);
                                                Sleep(300);
                                                scanf(&quot;%d&quot;, &amp;i);
                                                if (i == 1 &amp;&amp; yakusou != 0) {
                                                        
                                                        HP = HP + 10;
                                                        yakusou = yakusou - 1;
                                                        while (getchar() != &#039;\n&#039;);
                                                                printf(&quot;HPが かいふくした\n&quot;);
                                                        
                                                        if (LV == 1 &amp;&amp; HP &gt; 15) { HP = 15; }
                                                        if (LV == 2 &amp;&amp; HP &gt; 17) { HP = 17; }
                                                        if (LV == 3 &amp;&amp; HP &gt; 20) { HP = 20; }
                                                        i = 0;


                                                }
                                                if (i == 2 &amp;&amp; kimera != 0) { while (getchar() != &#039;\n&#039;);  printf(&quot;いまはつかえない&quot;); i = 0; }
                                        
                                                if (i == 3) {
                                                        while (getchar() != &#039;\n&#039;); printf(&quot; &quot;);
                                                        i = 0;
                                                }
                                                
                                        }MENU = 0;
                                }
                                //ステータス
                                if (MENU == 2) {
                                        system(&quot;cls&quot;);
                                        printf(&quot;HP %d\n&quot;, HP);
                                        printf(&quot;ATK %d\n&quot;, ATK);
                                        printf(&quot;DEF %d\n&quot;, DEF);
                                        printf(&quot;EXP %d\n&quot;, EXP);
                                        printf(&quot;LV  %d\n\n&quot;, LV);
                                        printf(&quot;%dG&quot;, money);
                                        MENU = 0;


                                }
                                //とじる
                                if (MENU == 3){
                                        system(&quot;cls&quot;);
                                        printf(&quot;DELETEを押してください&quot;);
                                        MENU = 0;
                        }


                                                menu++;


                                        }


                                        if (menu == 2) {


                                                if (GetAsyncKeyState(VK_DELETE) &amp; 0x8000)
                                                {
                                                        Sleep(300);
                                                        system(&quot;cls&quot;);


                                                        strcpy(str, map.c_str());
                                                        printf(&quot;%s\n&quot;, str);
                                                        menu = menu - 1;




                                                }
                                        }


                                        //フィールド移動
                                        if (GetAsyncKeyState(VK_UP) &amp; 0x8000)
                                        {
                                                //戦闘
                                                srand((unsigned)time(NULL));
                                                battle = rand() % 9 + 1;


                                                if (battle == 1) {
                                                        s++;
                                                        s2++;
                                                        system(&quot;cls&quot;);
                                                        printf(&quot;敵が現れた\n\n\n&quot;);
														printf(&quot;               i⌒i\n&quot;);
														printf(&quot;               |  |\n&quot;);
														printf(&quot;          ,,ｒ’‘ヽ\n&quot;);
														printf(&quot;         r‐”     ヽ､\n&quot;);
														printf(&quot;         ／           ＼\n&quot;);
														printf(&quot;       /   （ ･ ）（ ･ ）ヽ\n&quot;);
														printf(&quot;       |    ,-､   ,-､     |\n&quot;);
														printf(&quot;      ヽ    ヽ､ ￣￣ ノ  /\n&quot;);
														printf(&quot;        `-､  ｀￣￣´   ／\n&quot;);
														printf(&quot;          ￣￣￣￣￣￣￣\n&quot;);


                                                        printf(&quot;\n1 戦う\n2 逃げる\n\nどちらにしますか? ＞&quot;);
                                                        Sleep(300);
                                                        scanf(&quot;%d&quot;, &amp;battle2);


                                                        if (battle2 == 1) {
                                                                //バトル処理


                                                                do {
                                                                        system(&quot;cls&quot;);
                                                                        printf(&quot;               i⌒i\n&quot;);
                                                                        printf(&quot;               |  |\n&quot;);
                                                                        printf(&quot;          ,,ｒ’‘ヽ\n&quot;);
                                                                        printf(&quot;         r‐”     ヽ､\n&quot;);
                                                                        printf(&quot;         ／           ＼\n&quot;);
                                                                        printf(&quot;       /   （ ･ ）（ ･ ）ヽ\n&quot;);
                                                                        printf(&quot;       |    ,-､   ,-､     |\n&quot;);
                                                                        printf(&quot;      ヽ    ヽ､ ￣￣ ノ  /\n&quot;);
                                                                        printf(&quot;        `-､  ｀￣￣´   ／\n&quot;);
                                                                        printf(&quot;          ￣￣￣￣￣￣￣\n&quot;);
                                                                        printf(&quot;自分 HP%d\n&quot;, HP);
                                                                        printf(&quot;1 こうげき\n2 アイテム\n3 にげる\n\n&quot;);
                                                                        printf(&quot;どうしますか？ ＞&quot;);


                                                                        Sleep(300);
                                                                        scanf(&quot;%d&quot;, &amp;battle3);


                                                                        if (battle3 == 1) {
																			enemyHP = enemyHP - (ATK - enemyDEF );
                                                                                system(&quot;cls&quot;);
                                                                                while (getchar() != &#039;\n&#039;);
																				printf(&quot;%dのダメージをあたえた\n&quot;, ATK - enemyDEF );
                                                                                if (enemyHP &lt; 1) {
                                                                                
                                                                                        s2 = s2 - 1;


                                                                                }battle3 = 0;
                                                                        }
                                                                        if (battle3 == 2) {
                                                                                system(&quot;cls&quot;);
                                                                                while (getchar() != &#039;\n&#039;);
                                                                                if (yakusou == 0 &amp;&amp; kimera == 0) { printf(&quot;持ち物はありません&quot;); }
                                                                                if (yakusou != 0) { printf(&quot;1 薬草x%d\n&quot;, yakusou); }
                                                                                if (kimera != 0) { printf(&quot;2 キメラのつばさx%d\n&quot;, kimera); }
                                                                                if (yakusou != 0 || kimera != 0) {
                                                                                        printf(&quot;3 なにもつかわない\n\n&quot;);
                                                                                        printf(&quot;なにをつかいますか？ ＞&quot;);
                                                                                        Sleep(300);
                                                                                        scanf(&quot;%d&quot;, &amp;i);
                                                                                        if (i == 1 &amp;&amp; yakusou != 0) {


                                                                                                HP = HP + 10;
                                                                                                yakusou = yakusou - 1;
                                                                                                while (getchar() != &#039;\n&#039;);
                                                                                                printf(&quot;HPが かいふくした\n&quot;);


                                                                                                if (LV == 1 &amp;&amp; HP &gt; 15) { HP = 15; }
                                                                                                if (LV == 2 &amp;&amp; HP &gt; 17) { HP = 17; }
                                                                                                if (LV == 3 &amp;&amp; HP &gt; 20) { HP = 20; }
                                                                                                i = 0;


                                                                                        }
                                                                                        if (i == 2 &amp;&amp; kimera != 0) { while (getchar() != &#039;\n&#039;);  printf(&quot;いまはつかえない&quot;); i = 0; }


                                                                                        if (i == 3) {
                                                                                                while (getchar() != &#039;\n&#039;); printf(&quot; &quot;); i = 0;
                                                                                        }


                                                                                }




                                                                                battle3 = 0;
                                                                        }
                                                                        if (battle3 == 3) {
                                                                                srand((unsigned)time(NULL));
                                                                                nigeru = rand() % 2 + 1;
                                                                                if (nigeru != 1) { s = s - 1; }
                                                                                battle3 = 0;
                                                                        }
                                                                        //敵の攻撃


                                                                        if (s2 == 1) {
                                                                                HP = HP - (enemyATK+3 - DEF);
                                                                                Sleep(1000);


                                                                                while (getchar() != &#039;\n&#039;);
                                                                                printf(&quot;%dのダメージを受けた&quot;, enemyATK+3 - DEF);
                                                                                while (getchar() != &#039;\n&#039;);
                                                                                if (HP &lt; 1) { 
                                                                                        while (getchar() != &#039;\n&#039;);
                                                                                        printf(&quot;ゲームオーバー&quot;);
                                                                                        while (getchar() != &#039;\n&#039;); abort();
                                                                                }


                                                                        }
                                                                        if (s2 == 0) { 
                                                                                Sleep(1000);
                                                                                while (getchar() != &#039;\n&#039;);
                                                                                printf(&quot;勝利\n&quot;);
                                                                                printf(&quot;２のけいけんちをえた&quot;);
                                                                                while (getchar() != &#039;\n&#039;);


                                                                                EXP = EXP + 2;
                                                                                if (LV == 1 &amp;&amp; EXP &gt; 2) {
                                                                                        LV++; ATK++; DEF++; HP = HP + 2;
                                                                                        while (getchar() != &#039;\n&#039;);
                                                                                        printf(&quot;レベルアップ！\nこうげき が 1 あがった\n&quot;);
                                                                                        printf(&quot;ぼうぎょ が １ あがった\n&quot;);
                                                                                        printf(&quot;たいりょく が ２ あがった\n&quot;);


                                                                                }




                                                                                if (LV == 2 &amp;&amp; EXP &gt; 5) {
                                                                                        LV++; ATK = ATK + 2; DEF = DEF + 3; HP = HP + 3;
                                                                                        while (getchar() != &#039;\n&#039;);
                                                                                        printf(&quot;レベルアップ！\nこうげき が ２ あがった\n&quot;);
                                                                                        printf(&quot;ぼうぎょ が ３ あがった\n&quot;);
                                                                                        printf(&quot;たいりょく が ３ あがった\n&quot;);


                                                                                }




                                                                                
                                                                                s = s - 1; }




                                                                } while (s == 1);
                                                                enemyHP = 3;
                                                                //フィールドに戻る
                                                                system(&quot;cls&quot;);


                                                                strcpy(str, map.c_str());
                                                                printf(&quot;%s\n&quot;, str);
                                                                battle2 = 0;






                                                        }


                                                        if (battle2 == 2) {
                                                                srand((unsigned)time(NULL));
                                                                nigeru = rand() % 2 + 1;
                                                                if (nigeru != 1) {
                                                                        //フィールドに戻る
                                                                        system(&quot;cls&quot;);


                                                                        strcpy(str, map.c_str());
                                                                        printf(&quot;%s\n&quot;, str);
                                                                }
                                                                if (nigeru == 1) {
                                                                        system(&quot;cls&quot;);
                                                                        while (getchar() != &#039;\n&#039;);  printf(&quot;逃げられなかった&quot;);
                                                                        //バトル処理


                                                                }
                                                                battle2 = 0;
                                                        }


                                                }
                                                //戦闘終了




                                                y = y + 15;


                                                system(&quot;cls&quot;);
                                                x = x - 15;
                                                map[x] = &#039;A&#039;;
                                                strcpy(str, map.c_str());
                                                printf(&quot;%s\n&quot;, str);


                                                system(&quot;cls&quot;);
                                                y = x + 15;
                                                map[y] = &#039;w&#039;;
                                                strcpy(str, map.c_str());
                                                printf(&quot;%s\n&quot;, str);


                                                Sleep(200);


                                        }


                                        if (GetAsyncKeyState(VK_LEFT) &amp; 0x8000)


                                        {


                                                y = y + 1;


                                                system(&quot;cls&quot;);
                                                x = x - 1;
                                                map[x] = &#039;A&#039;;
                                                strcpy(str, map.c_str());
                                                printf(&quot;%s\n&quot;, str);


                                                system(&quot;cls&quot;);
                                                y = x + 1;
                                                map[y] = &#039;w&#039;;
                                                strcpy(str, map.c_str());
                                                printf(&quot;%s\n&quot;, str);


                                                Sleep(200);
                                        }


                                        if (GetAsyncKeyState(VK_DOWN) &amp; 0x8000)
                                        {






                                                y = y - 15;


                                                system(&quot;cls&quot;);
                                                x = x + 15;
                                                map[x] = &#039;A&#039;;
                                                strcpy(str, map.c_str());
                                                printf(&quot;%s\n&quot;, str);


                                                system(&quot;cls&quot;);
                                                y = x - 15;
                                                map[y] = &#039;w&#039;;
                                                strcpy(str, map.c_str());
                                                printf(&quot;%s\n&quot;, str);


                                                Sleep(200);


                                        }




                                        if (GetAsyncKeyState(VK_RIGHT) &amp; 0x8000)


                                        {


                                                y = y - 1;


                                                system(&quot;cls&quot;);
                                                x = x + 1;
                                                map[x] = &#039;A&#039;;
                                                strcpy(str, map.c_str());
                                                printf(&quot;%s\n&quot;, str);


                                                system(&quot;cls&quot;);
                                                y = x - 1;
                                                map[y] = &#039;w&#039;;
                                                strcpy(str, map.c_str());
                                                printf(&quot;%s\n&quot;, str);


                                                Sleep(200);
                                        }


                                        if (x == 0 || x == 15 || x == 30 || x == 45 || x == 60 || x == 75 || x == 90 || x == 105 || x == 120)
                                        {
                                                system(&quot;cls&quot;);
                                                x = x + 1;
                                                map[x] = &#039;A&#039;;
                                                map[x - 1] = &#039;M&#039;;
                                                strcpy(str, map.c_str());
                                                printf(&quot;%s\n&quot;, str);
                                                printf(&quot;山へは入れない&quot;);
                                                Sleep(1000);
                                                system(&quot;cls&quot;);
                                                printf(&quot;%s\n&quot;, str);




                                        }


                                        if (x == 13)
                                        {
                                                z++;
                                                x = x + 15;
                                                map[13] = &#039;T&#039;;
                                        }

									if (x ==121 )
										{
											z = z + 2;
											x = x - 15;
											map[121] = &#039;C&#039;;
										}



                                }


                                //町用処理
                                while (z == 2) {










                                        //町メニュー
                                        if (GetAsyncKeyState(VK_ESCAPE) &amp; 0x8000)
                                        {
                                                Sleep(300);
                                                system(&quot;cls&quot;);
                                                printf(&quot;メニュー\n\n&quot;);
                                                printf(&quot;1 持ち物\n2 ステータス\n3 とじる\n\nどれを開きますか? ＞&quot;);
                                                Sleep(300);
                                                scanf(&quot;%d&quot;, &amp;MENU2);
                                                //持ち物
                                                if (MENU2 == 1) {
                                                        system(&quot;cls&quot;);
                                                        if (yakusou == 0 &amp;&amp; kimera == 0) { printf(&quot;持ち物はありません&quot;); }
                                                        if (yakusou != 0) { printf(&quot;1 薬草x%d\n&quot;, yakusou); }
                                                        if (kimera != 0) { printf(&quot;2 キメラのつばさx%d\n&quot;, kimera); }
                                                        if (yakusou != 0 || kimera != 0) {
                                                                printf(&quot;3 なにもつかわない\n\n&quot;);
                                                                printf(&quot;なにをつかいますか？ ＞&quot;);
                                                                Sleep(300);
                                                                scanf(&quot;%d&quot;, &amp;i);
                                                                if (i == 1 &amp;&amp; yakusou != 0) {


                                                                        HP = HP + 10;
                                                                        yakusou = yakusou - 1;
                                                                        while (getchar() != &#039;\n&#039;);
                                                                        printf(&quot;HPが かいふくした\n&quot;);


                                                                        if (LV == 1 &amp;&amp; HP &gt; 15) { HP = 15; }
                                                                        if (LV == 2 &amp;&amp; HP &gt; 17) { HP = 17; }
                                                                        if (LV == 3 &amp;&amp; HP &gt; 20) { HP = 20; }


                                                                        i = 0;
                                                                }
                                                                if (i == 2 &amp;&amp; kimera != 0) { while (getchar() != &#039;\n&#039;);  printf(&quot;いまはつかえない&quot;); i = 0; }


                                                                if (i == 3) {
                                                                        while (getchar() != &#039;\n&#039;); printf(&quot; &quot;); i = 0;
                                                                }
                                                        }
                                                        MENU2 = 0;
                                                }
                                                //ステータス
                                                if (MENU2 == 2) {
                                                        system(&quot;cls&quot;);
                                                        printf(&quot;HP %d\n&quot;, HP);
                                                        printf(&quot;ATK %d\n&quot;, ATK);
                                                        printf(&quot;DEF %d\n&quot;, DEF);
                                                        printf(&quot;EXP %d\n&quot;, EXP);
                                                        printf(&quot;LV  %d\n\n&quot;, LV);
                                                        printf(&quot;%dG&quot;, money);
                                                        MENU2 = 0;
                                                }
                                                //とじる


                                                if (MENU2 == 3) {
                                                        Sleep(300);
                                                        system(&quot;cls&quot;);
                                                        printf(&quot;DELETEを押してください&quot;);
                                                        MENU2 = 0;
                                                }


                                                menu2 = menu2 + 1;


                                        }


                                        if (menu2 &gt; 1) {


                                                if (GetAsyncKeyState(VK_DELETE) &amp; 0x8000)
                                                {
                                                        Sleep(300);
                                                        system(&quot;cls&quot;);


                                                        strcpy(str2, map2.c_str());
                                                        printf(&quot;%s\n&quot;, str2);
                                                        menu = menu - 1;




                                                }
                                        }






                                        if (q == 1) {


                                                system(&quot;cls&quot;);
                                                map2[x2] = &#039;A&#039;;
                                                strcpy(str2, map2.c_str());




                                                printf(&quot;%s\n&quot;, str2);
                                                q = q + 1;
                                        }


                                        //町での移動


                                        if (x2 != 19 &amp;&amp; x2 != 9 &amp;&amp; x2 != 10 &amp;&amp; x2 != 12 &amp;&amp; x2 != 13) {


                                                if (GetAsyncKeyState(VK_UP) &amp; 0x8000)
                                                {






                                                        y2 = y2 + 8;


                                                        system(&quot;cls&quot;);
                                                        x2 = x2 - 8;
                                                        map2[x2] = &#039;A&#039;;
                                                        strcpy(str2, map2.c_str());
                                                        printf(&quot;%s\n&quot;, str2);


                                                        system(&quot;cls&quot;);
                                                        y2 = x2 + 8;
                                                        map2[y2] = &#039;l&#039;;
                                                        strcpy(str2, map2.c_str());
                                                        printf(&quot;%s\n&quot;, str2);


                                                        Sleep(200);


                                                };
                                        }




                                        if (x2 != 9 &amp;&amp; x2 != 17 &amp;&amp; x2 != 12) {


                                                if (GetAsyncKeyState(VK_LEFT) &amp; 0x8000)


                                                {


                                                        y2 = y2 + 1;


                                                        system(&quot;cls&quot;);
                                                        x2 = x2 - 1;
                                                        map2[x2] = &#039;A&#039;;
                                                        strcpy(str2, map2.c_str());
                                                        printf(&quot;%s\n&quot;, str2);


                                                        system(&quot;cls&quot;);
                                                        y2 = x2 + 1;
                                                        map2[y2] = &#039;l&#039;;
                                                        strcpy(str2, map2.c_str());
                                                        printf(&quot;%s\n&quot;, str2);


                                                        Sleep(200);
                                                };
                                        }




                                        if (x2 != 17 &amp;&amp; x2 != 18 &amp;&amp; x2 != 20 &amp;&amp; x2 != 21) {


                                                if (GetAsyncKeyState(VK_DOWN) &amp; 0x8000)
                                                {






                                                        y2 = y2 - 7;


                                                        system(&quot;cls&quot;);
                                                        x2 = x2 + 8;
                                                        map2[x2] = &#039;A&#039;;
                                                        strcpy(str2, map2.c_str());
                                                        printf(&quot;%s\n&quot;, str2);


                                                        system(&quot;cls&quot;);
                                                        y2 = x2 - 8;
                                                        map2[y2] = &#039;l&#039;;
                                                        strcpy(str2, map2.c_str());
                                                        printf(&quot;%s\n&quot;, str2);


                                                        Sleep(200);


                                                };
                                        }




                                        if (x2 != 10 &amp;&amp; x2 != 13 &amp;&amp; x2 != 21) {


                                                if (GetAsyncKeyState(VK_RIGHT) &amp; 0x8000)


                                                {


                                                        y2 = y2 - 1;


                                                        system(&quot;cls&quot;);
                                                        x2 = x2 + 1;
                                                        map2[x2] = &#039;A&#039;;
                                                        strcpy(str2, map2.c_str());
                                                        printf(&quot;%s\n&quot;, str2);


                                                        system(&quot;cls&quot;);
                                                        y2 = x2 - 1;
                                                        map2[y2] = &#039;l&#039;;
                                                        strcpy(str2, map2.c_str());
                                                        printf(&quot;%s\n&quot;, str2);


                                                        Sleep(200);
                                                };
                                        }

										//町からフィールドに戻る
                                        if (x2 == 27) {
                                                z = z - 1;
                                                q = q - 1;


                                                system(&quot;cls&quot;);
                                                map[x] = &#039;A&#039;;
                                                strcpy(str, map.c_str());
                                                printf(&quot;%s\n&quot;, str);
                                                x2 = x2 - 8;
                                                strcpy(str2, map2.c_str());
                                                map2[27] = &#039;o&#039;;
                                        }


                                        //買い物
                                        if (x2 == 19 &amp;&amp; GetAsyncKeyState(VK_RETURN) &amp; 0x8000 &amp;&amp; shop == 1&amp;&amp;MENU2==0)
                                        {
                                                Sleep(500);
                                                system(&quot;cls&quot;);
                                                printf(&quot;道具屋\n\n1 薬草            5G\n2 キメラのつばさ 15G\n3 用はない\n\n何を買いますか？ ＞&quot;);
                                                Sleep(300);
                                                scanf(&quot;%d&quot;, &amp;SHOP);
                                                


                                                if (SHOP == 1 &amp;&amp; money &gt; 5) {
                                                        yakusou++;
                                                        money = money - 5;
                                                        system(&quot;cls&quot;);
                                                        printf(&quot;薬草を買いました\n残りの所持金は%dGです&quot;, money);
                                                        Sleep(900);
                                                        system(&quot;cls&quot;);


                                                        strcpy(str2, map2.c_str());
                                                        printf(&quot;%s\n&quot;, str2);
                                                        shop = shop - 1;


                                                        SHOP = 0;
                                                }


                                                if (SHOP == 2 &amp;&amp; money &gt; 15) {
                                                        kimera++;
                                                        money = money - 15;
                                                        system(&quot;cls&quot;);
                                                        printf(&quot;キメラの翼を買いました\n残りの所持金は%dGです&quot;, money);
                                                        Sleep(900);
                                                        system(&quot;cls&quot;);


                                                        strcpy(str2, map2.c_str());
                                                        printf(&quot;%s\n&quot;, str2);
                                                        shop = shop - 1;
                                                        SHOP = 0;
                                                }








                                                shop = shop + 1;


                                        }


                                        if (shop == 2) {


                                                if (GetAsyncKeyState(VK_DELETE) &amp; 0x8000)
                                                {
                                                        Sleep(300);
                                                        system(&quot;cls&quot;);


                                                        strcpy(str2, map2.c_str());
                                                        printf(&quot;%s\n&quot;, str2);
                                                        shop = shop - 1;




                                                }
                                        }


















                                }
				//城用処理
					while (z == 3){
					



						//城メニュー
						if (GetAsyncKeyState(VK_ESCAPE) &amp; 0x8000)
							{
							last++;
							Sleep(300);
							system(&quot;cls&quot;);
							printf(&quot;メニュー\n\n&quot;);
							printf(&quot;1 持ち物\n2 ステータス\n3 とじる\n\nどれを開きますか? ＞&quot;);
							Sleep(300);
							scanf(&quot;%d&quot;, &amp;MENU3);
							//持ち物
							if (MENU3 == 1) {
								system(&quot;cls&quot;);
								if (yakusou == 0 &amp;&amp; kimera == 0) { printf(&quot;持ち物はありません&quot;); }
								if (yakusou != 0) { printf(&quot;1 薬草x%d\n&quot;, yakusou); }
								if (kimera != 0) { printf(&quot;2 キメラのつばさx%d\n&quot;, kimera); }
								if (yakusou != 0 || kimera != 0) {
									printf(&quot;3 なにもつかわない\n\n&quot;);
									printf(&quot;なにをつかいますか？ ＞&quot;);
									Sleep(300);
									scanf(&quot;%d&quot;, &amp;i);
									if (i == 1 &amp;&amp; yakusou != 0) {


										HP = HP + 10;
										yakusou = yakusou - 1;
										while (getchar() != &#039;\n&#039;);
										printf(&quot;HPが かいふくした\n&quot;);


										if (LV == 1 &amp;&amp; HP &gt; 15) { HP = 15; }
										if (LV == 2 &amp;&amp; HP &gt; 17) { HP = 17; }
										if (LV == 3 &amp;&amp; HP &gt; 20) { HP = 20; }


										i = 0;
									}
									if (i == 2 &amp;&amp; kimera != 0) { while (getchar() != &#039;\n&#039;);  printf(&quot;いまはつかえない&quot;); i = 0; }


									if (i == 3) {
										while (getchar() != &#039;\n&#039;); printf(&quot; &quot;); i = 0;
									}
								}
								MENU3 = 0;
							}
							//ステータス
							if (MENU3 == 2) {
								system(&quot;cls&quot;);
								printf(&quot;HP %d\n&quot;, HP);
								printf(&quot;ATK %d\n&quot;, ATK);
								printf(&quot;DEF %d\n&quot;, DEF);
								printf(&quot;EXP %d\n&quot;, EXP);
								printf(&quot;LV  %d\n\n&quot;, LV);
								printf(&quot;%dG&quot;, money);
								MENU3 = 0;
							}
							//とじる


							if (MENU3 == 3) {
								Sleep(300);
								system(&quot;cls&quot;);
								printf(&quot;DELETEを押してください&quot;);
								MENU3 = 0;
							}


							menu3 = menu3 + 1;

							last = last - 1;
						}


						if (menu3 &gt; 1) {


							if (GetAsyncKeyState(VK_DELETE) &amp; 0x8000)
							{
								Sleep(300);
								system(&quot;cls&quot;);


								strcpy(str3, map3.c_str());
								printf(&quot;%s\n&quot;, str3);
								menu = menu - 1;




							}
						}






						if (w == 1) {


							system(&quot;cls&quot;);
							map3[x3] = &#039;A&#039;;
							strcpy(str3, map3.c_str());




							printf(&quot;%s\n&quot;, str3);
							w = w + 1;
						}


						//城での移動


						if (x3 != 9 &amp;&amp; x3 != 10 &amp;&amp; x3 != 12 &amp;&amp; x3 != 13 ) {


							if (GetAsyncKeyState(VK_UP) &amp; 0x8000)
							{






								y3 = y3 + 8;


								system(&quot;cls&quot;);
								x3 = x3 - 8;
								map3[x3] = &#039;A&#039;;
								strcpy(str3, map3.c_str());
								printf(&quot;%s\n&quot;, str3);


								system(&quot;cls&quot;);
								y3 = x3 + 8;
								map3[y3] = &#039;l&#039;;
								strcpy(str3, map3.c_str());
								printf(&quot;%s\n&quot;, str3);


								Sleep(200);


							};
						}




						if (x3 != 20 &amp;&amp; x3 != 9 &amp;&amp; x3 != 17) {


							if (GetAsyncKeyState(VK_LEFT) &amp; 0x8000)


							{


								y3 = y3 + 1;


								system(&quot;cls&quot;);
								x3 = x3 - 1;
								map3[x3] = &#039;A&#039;;
								strcpy(str3, map3.c_str());
								printf(&quot;%s\n&quot;, str3);


								system(&quot;cls&quot;);
								y3 = x3 + 1;
								map3[y3] = &#039;l&#039;;
								strcpy(str3, map3.c_str());
								printf(&quot;%s\n&quot;, str3);


								Sleep(200);
							};
						}




						if (x3 != 11 &amp;&amp; x3 != 17 &amp;&amp; x3 != 18 &amp;&amp; x3 != 20&amp;&amp;x3!=21) {


							if (GetAsyncKeyState(VK_DOWN) &amp; 0x8000)
							{






								y3 = y3 - 7;


								system(&quot;cls&quot;);
								x3 = x3 + 8;
								map3[x3] = &#039;A&#039;;
								strcpy(str3, map3.c_str());
								printf(&quot;%s\n&quot;, str3);


								system(&quot;cls&quot;);
								y3 = x3 - 8;
								map3[y3] = &#039;l&#039;;
								strcpy(str3, map3.c_str());
								printf(&quot;%s\n&quot;, str3);


								Sleep(200);


							};
						}




						if (x3 != 13 &amp;&amp; x3 != 18 &amp;&amp; x3 != 21) {


							if (GetAsyncKeyState(VK_RIGHT) &amp; 0x8000)


							{


								y3 = y3 - 1;


								system(&quot;cls&quot;);
								x3 = x3 + 1;
								map3[x3] = &#039;A&#039;;
								strcpy(str3, map3.c_str());
								printf(&quot;%s\n&quot;, str3);


								system(&quot;cls&quot;);
								y3 = x3 - 1;
								map3[y3] = &#039;l&#039;;
								strcpy(str3, map3.c_str());
								printf(&quot;%s\n&quot;, str3);


								Sleep(200);
							};
						}
					
						//城からフィールドに戻る
						if (x3 == 3) {
							z = z - 2;
							w = w - 1;


							system(&quot;cls&quot;);
							map[x] = &#039;A&#039;;
							strcpy(str, map.c_str());
							printf(&quot;%s\n&quot;, str);
							x3 = x3 + 8;
							strcpy(str3, map3.c_str());
							map3[3] = &#039;o&#039;;
						}

						//ボス戦
						if(x3==11&amp;&amp; GetAsyncKeyState(VK_RETURN) &amp; 0x8000&amp;&amp;last==0){

							while (getchar() != &#039;\n&#039;);
							Sleep(300);
							system(&quot;cls&quot;);
							printf(&quot;これが最後の戦いだ&quot;);
							
							//ボスAA表示
							


							while (getchar() != &#039;\n&#039;);


							do {
								system(&quot;cls&quot;);
								//ボスAA表示


								printf(&quot;自分 HP%d\n&quot;, HP);
								printf(&quot;1 こうげき\n2 アイテム\n3 にげる\n\n&quot;);
								printf(&quot;どうしますか？ ＞&quot;);


								Sleep(300);
								scanf(&quot;%d&quot;, &amp;battle3);


								if (battle3 == 1) {
									bossHP = bossHP - (ATK - bossDEF);
									system(&quot;cls&quot;);
									while (getchar() != &#039;\n&#039;);
									printf(&quot;%dのダメージをあたえた\n&quot;, ATK - bossDEF);
									if (bossHP &lt; 1) {

										s2 = s2 - 1;


									}battle3 = 0;
								}
								if (battle3 == 2) {
									system(&quot;cls&quot;);
									while (getchar() != &#039;\n&#039;);
									if (yakusou == 0 &amp;&amp; kimera == 0) { printf(&quot;持ち物はありません&quot;); }
									if (yakusou != 0) { printf(&quot;1 薬草x%d\n&quot;, yakusou); }
									if (kimera != 0) { printf(&quot;2 キメラのつばさx%d\n&quot;, kimera); }
									if (yakusou != 0 || kimera != 0) {
										printf(&quot;3 なにもつかわない\n\n&quot;);
										printf(&quot;なにをつかいますか？ ＞&quot;);
										Sleep(300);
										scanf(&quot;%d&quot;, &amp;i);
										if (i == 1 &amp;&amp; yakusou != 0) {


											HP = HP + 10;
											yakusou = yakusou - 1;
											while (getchar() != &#039;\n&#039;);
											printf(&quot;HPが かいふくした\n&quot;);


											if (LV == 1 &amp;&amp; HP &gt; 15) { HP = 15; }
											if (LV == 2 &amp;&amp; HP &gt; 17) { HP = 17; }
											if (LV == 3 &amp;&amp; HP &gt; 20) { HP = 20; }
											i = 0;


										}
										if (i == 2 &amp;&amp; kimera != 0) { while (getchar() != &#039;\n&#039;);  printf(&quot;いまはつかえない&quot;); i = 0; }


										if (i == 3) {
											while (getchar() != &#039;\n&#039;); printf(&quot; &quot;); i = 0;
										}


									}




									battle3 = 0;
								}
								if (battle3 == 3) {
									while (getchar() != &#039;\n&#039;);
									printf(&quot;この戦いからは逃げられない&quot;);
									while (getchar() != &#039;\n&#039;);
								}
								//敵の攻撃


								if (s2 == 1) {
									HP = HP - (bossATK  - DEF);
									Sleep(1000);


									while (getchar() != &#039;\n&#039;);
									printf(&quot;%dのダメージを受けた&quot;, bossATK  - DEF);
									while (getchar() != &#039;\n&#039;);
									if (HP &lt; 1) {
										while (getchar() != &#039;\n&#039;);
										printf(&quot;ゲームオーバー&quot;);
										while (getchar() != &#039;\n&#039;); abort();
									}


								}
								if (s2 == 0) {
									Sleep(1000);
									while (getchar() != &#039;\n&#039;);
									printf(&quot;勝利\n&quot;);
									printf(&quot;ゲームクリア&quot;);
									while (getchar() != &#039;\n&#039;);
									abort();


								





									s = s - 1;
								}




							} while (s == 1);
						
						
						
						}
					
					
					
					
					
					
					}






                        }
                }    </description>
    <dc:date>2017-11-28T10:27:13+09:00</dc:date>
    <utime>1511832433</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/memoyoushi/pages/14.html">
    <title>Cpp</title>
    <link>https://w.atwiki.jp/memoyoushi/pages/14.html</link>
    <description>
      aq    </description>
    <dc:date>2017-11-28T09:23:08+09:00</dc:date>
    <utime>1511828588</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/memoyoushi/pages/13.html">
    <title>A</title>
    <link>https://w.atwiki.jp/memoyoushi/pages/13.html</link>
    <description>
      https://drive.google.com/open?id=1F3PmPvWiuNXOqLH28PaIDBm6H4zA41eojUWHn0dPEQM    </description>
    <dc:date>2017-11-28T09:02:03+09:00</dc:date>
    <utime>1511827323</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/memoyoushi/pages/12.html">
    <title>C言語 RPG作成 メモ</title>
    <link>https://w.atwiki.jp/memoyoushi/pages/12.html</link>
    <description>
      (&quot;
#include&lt;stdio.h&gt;
#include&lt;string.h&gt;
#include&lt;windows.h&gt;
#include&lt;string&gt;
#include&lt;iostream&gt;
#include&lt;stdlib.h&gt;
#include&lt;time.h&gt;




char x = 66;
char y = 66;
char x2 = 19;
char z = 1;
char q = 1;
char y2 = 19;
char menu = 1;
char menu2 = 1;
char shop = 1;
int money = 100;
char item;
int MENU;
int MENU2;
char SHOP;
int yakusou = 0;
int kimera = 0;
int HP = 15;
int ATK = 5;
int DEF = 5;
int EXP = 0;
int LV = 1;
int enemyHP = 3;
int enemyATK = 7;
int enemyDEF = 4;
int battle;
int battle2;
int battle3;
int nigeru;
int s = 0;
int i = 5;
int s2 = 0;












using namespace std;


int main() {


    //フィールドマップ


    char str[1000];


    string map;


    map = &quot;MwwwwwwwwwwwwT\nMwwwwwwwwwwwww\nMwwwwwwwwwwwww\nMwwwwwwwwwwwww\nMwwwwwwwwwwwww\nMwwwwwwwwwwwww\nMwwwwwwwwwwwww\nMwwwwwwwwwwwww\nMwwwwwwwwwwwww\n&quot;;




    map[x] = &#039;A&#039;;
    strcpy(str, map.c_str());
    printf(&quot;%s\n&quot;, str);


    //町マップ


    char str2[1000];


    string map2;


    map2 = &quot;EEEEEEE\nEllSllE\nElllllE\nEEEoEEE\n&quot;;






    char up = 0;
    char left = 0;
    char right = 0;
    char down = 0;


    while (1) {


        //フィールド用処理
        while (z == 1) {


            //フィールドメニュー
            if (GetAsyncKeyState(VK_ESCAPE) &amp; 0x8000)
            {
                Sleep(300);
                system(&quot;cls&quot;);
                printf(&quot;メニュー\n\n&quot;);
                printf(&quot;1 持ち物\n2 ステータス\n3 とじる\n\nどれを開きますか?　＞&quot;);
                Sleep(300);
                scanf(&quot;%d&quot;, &amp;MENU);
                //持ち物
                if (MENU == 1) {


                    system(&quot;cls&quot;);
                    if (yakusou == 0 &amp;&amp; kimera == 0) { printf(&quot;持ち物はありません&quot;); }
                    if (yakusou != 0) { printf(&quot;1 薬草x%d\n&quot;, yakusou); }
                    if (kimera != 0) { printf(&quot;2 キメラのつばさx%d\n&quot;, kimera); }
                    if (yakusou != 0 || kimera != 0) {
                        printf(&quot;3 なにもつかわない\n\n&quot;);
                        printf(&quot;なにをつかいますか？　＞&quot;);
                        Sleep(300);
                        scanf(&quot;%d&quot;, &amp;i);
                        if (i == 1 &amp;&amp; yakusou != 0) {


                            HP = HP + 10;
                            yakusou = yakusou - 1;
                            while (getchar() != &#039;\n&#039;);
                            printf(&quot;HPが　かいふくした\n&quot;);


                            if (LV == 1 &amp;&amp; HP &gt; 15) { HP = 15; }
                            if (LV == 2 &amp;&amp; HP &gt; 17) { HP = 17; }
                            if (LV == 3 &amp;&amp; HP &gt; 20) { HP = 20; }
                            i = 0;


                        }
                        if (i == 2 &amp;&amp; kimera != 0) { while (getchar() != &#039;\n&#039;);  printf(&quot;いまはつかえない&quot;); i = 0; }


                        if (i == 3) {
                            while (getchar() != &#039;\n&#039;); printf(&quot; &quot;);
                            i = 0;
                        }


                    }MENU = 0;
                }
                //ステータス
                if (MENU == 2) {
                    system(&quot;cls&quot;);
                    printf(&quot;HP %d\n&quot;, HP);
                    printf(&quot;ATK %d\n&quot;, ATK);
                    printf(&quot;DEF %d\n&quot;, DEF);
                    printf(&quot;EXP %d\n&quot;, EXP);
                    printf(&quot;LV  %d\n\n&quot;, LV);
                    printf(&quot;%dG&quot;, money);
                    MENU = 0;


                }
                //とじる
                if (MENU == 3) {
                    system(&quot;cls&quot;);
                    printf(&quot;DELETEを押してください&quot;);
                    MENU = 0;
                }


                menu++;


            }


            if (menu == 2) {


                if (GetAsyncKeyState(VK_DELETE) &amp; 0x8000)
                {
                    Sleep(300);
                    system(&quot;cls&quot;);


                    strcpy(str, map.c_str());
                    printf(&quot;%s\n&quot;, str);
                    menu = menu - 1;




                }
            }


            //フィールド移動
            if (GetAsyncKeyState(VK_UP) &amp; 0x8000)
            {
                //戦闘
                srand((unsigned)time(NULL));
                battle = rand() % 9 + 1;


                if (battle == 1) {
                    s++;
                    s2++;
                    system(&quot;cls&quot;);
                    printf(&quot;敵が現れた\n\n\n&quot;);
                    printf(&quot;　　　　　　　　　 i⌒i\n&quot;);
                    printf(&quot;　　　　　　　　　 |  |\n&quot;);
                    printf(&quot;　　 　　　    ,,ｒ’‘ヽ\n&quot;);
                    printf(&quot;　　　　　    r‐”　　 　 ヽ､\n&quot;);
                    printf(&quot;　　　  　  ／　 　　　　 　　＼\n&quot;);
                    printf(&quot;　　　     /  　（ ･ ）（ ･ ）　ヽ\n&quot;);
                    printf(&quot;　　　    |　 　 ,-､　　　,-､　  |\n&quot;);
                    printf(&quot;　　      ヽ　   ヽ､ ￣￣　ノ　　/\n&quot;);
                    printf(&quot;　　　　   `-､　　｀￣￣´　 　／\n&quot;);
                    printf(&quot;　　  　　　　 ￣￣￣￣￣￣￣\n&quot;);


                    printf(&quot;\n1 戦う\n2 逃げる\n\nどちらにしますか?　＞&quot;);
                    Sleep(300);
                    scanf(&quot;%d&quot;, &amp;battle2);


                    if (battle2 == 1) {
                        //バトル処理


                        do {
                            system(&quot;cls&quot;);
                            printf(&quot;　　　　　　　　　 i⌒i\n&quot;);
                            printf(&quot;　　　　　　　　　 |  |\n&quot;);
                            printf(&quot;　　 　　　    ,,ｒ’‘ヽ\n&quot;);
                            printf(&quot;　　　　　    r‐”　　 　 ヽ､\n&quot;);
                            printf(&quot;　　　  　  ／　 　　　　 　　＼\n&quot;);
                            printf(&quot;　　　     /  　（ ･ ）（ ･ ）　ヽ\n&quot;);
                            printf(&quot;　　　    |　 　 ,-､　　　,-､　  |\n&quot;);
                            printf(&quot;　　      ヽ　   ヽ､ ￣￣　ノ　　/\n&quot;);
                            printf(&quot;　　　　   `-､　　｀￣￣´　 　／\n&quot;);
                            printf(&quot;　　  　　　　 ￣￣￣￣￣￣￣\n&quot;);
                            printf(&quot;自分　HP%d\n&quot;, HP);
                            printf(&quot;1 こうげき\n2 アイテム\n3 にげる\n\n&quot;);
                            printf(&quot;どうしますか？　＞&quot;);


                            Sleep(300);
                            scanf(&quot;%d&quot;, &amp;battle3);


                            if (battle3 == 1) {
                                enemyHP = enemyHP - (ATK - enemyDEF);
                                system(&quot;cls&quot;);
                                while (getchar() != &#039;\n&#039;);
                                printf(&quot;%dのダメージをあたえた\n&quot;, ATK - enemyDEF);
                                if (enemyHP &lt; 1) {


                                    s2 = s2 - 1;


                                }battle3 = 0;
                            }
                            if (battle3 == 2) {
                                system(&quot;cls&quot;);
                                while (getchar() != &#039;\n&#039;);
                                if (yakusou == 0 &amp;&amp; kimera == 0) { printf(&quot;持ち物はありません&quot;); }
                                if (yakusou != 0) { printf(&quot;1 薬草x%d\n&quot;, yakusou); }
                                if (kimera != 0) { printf(&quot;2 キメラのつばさx%d\n&quot;, kimera); }
                                if (yakusou != 0 || kimera != 0) {
                                    printf(&quot;3 なにもつかわない\n\n&quot;);
                                    printf(&quot;なにをつかいますか？　＞&quot;);
                                    Sleep(300);
                                    scanf(&quot;%d&quot;, &amp;i);
                                    if (i == 1 &amp;&amp; yakusou != 0) {


                                        HP = HP + 10;
                                        yakusou = yakusou - 1;
                                        while (getchar() != &#039;\n&#039;);
                                        printf(&quot;HPが　かいふくした\n&quot;);


                                        if (LV == 1 &amp;&amp; HP &gt; 15) { HP = 15; }
                                        if (LV == 2 &amp;&amp; HP &gt; 17) { HP = 17; }
                                        if (LV == 3 &amp;&amp; HP &gt; 20) { HP = 20; }
                                        i = 0;


                                    }
                                    if (i == 2 &amp;&amp; kimera != 0) { while (getchar() != &#039;\n&#039;);  printf(&quot;いまはつかえない&quot;); i = 0; }


                                    if (i == 3) {
                                        while (getchar() != &#039;\n&#039;); printf(&quot; &quot;); i = 0;
                                    }


                                }




                                battle3 = 0;
                            }
                            if (battle3 == 3) {
                                srand((unsigned)time(NULL));
                                nigeru = rand() % 2 + 1;
                                if (nigeru != 1) { s = s - 1; }
                                battle3 = 0;
                            }
                            //敵の攻撃


                            if (s2 == 1) {
                                HP = HP - (enemyATK - DEF+3) ;
                                Sleep(1000);


                                while (getchar() != &#039;\n&#039;);
                                printf(&quot;%dのダメージを受けた&quot;, enemyATK - DEF+3);
                                while (getchar() != &#039;\n&#039;);
                                if (HP &lt; 1) {
                                    while (getchar() != &#039;\n&#039;);
                                    printf(&quot;ゲームオーバー&quot;);
                                    while (getchar() != &#039;\n&#039;); abort();
                                }


                            }
                            if (s2 == 0) {
                                Sleep(1000);
                                while (getchar() != &#039;\n&#039;);
                                printf(&quot;勝利\n&quot;);
                                printf(&quot;２のけいけんちをえた&quot;);
                                while (getchar() != &#039;\n&#039;);


                                EXP = EXP + 2;
                                if (LV == 1 &amp;&amp; EXP &gt; 2) {
                                    LV++; ATK++; DEF++; HP = HP + 2;
                                    while (getchar() != &#039;\n&#039;);
                                    printf(&quot;レベルアップ！\nこうげき　が　1　あがった\n&quot;);
                                    printf(&quot;ぼうぎょ　が　１　あがった\n&quot;);
                                    printf(&quot;たいりょく　が　２　あがった\n&quot;);


                                }




                                if (LV == 2 &amp;&amp; EXP &gt; 5) {
                                    LV++; ATK = ATK + 2; DEF = DEF + 3; HP = HP + 3;
                                    while (getchar() != &#039;\n&#039;);
                                    printf(&quot;レベルアップ！\nこうげき　が　２　あがった\n&quot;);
                                    printf(&quot;ぼうぎょ　が　３　あがった\n&quot;);
                                    printf(&quot;たいりょく　が　３　あがった\n&quot;);


                                }






                                s = s - 1;
                            }




                        } while (s == 1);
                        enemyHP = 3;
                        //フィールドに戻る
                        system(&quot;cls&quot;);


                        strcpy(str, map.c_str());
                        printf(&quot;%s\n&quot;, str);
                        battle2 = 0;






                    }


                    if (battle2 == 2) {
                        srand((unsigned)time(NULL));
                        nigeru = rand() % 2 + 1;
                        if (nigeru != 1) {
                            //フィールドに戻る
                            system(&quot;cls&quot;);


                            strcpy(str, map.c_str());
                            printf(&quot;%s\n&quot;, str);
                        }
                        if (nigeru == 1) {
                            system(&quot;cls&quot;);
                            while (getchar() != &#039;\n&#039;);  printf(&quot;逃げられなかった&quot;);
                            //バトル処理


                        }
                        battle2 = 0;
                    }


                }
                //戦闘終了




                y = y + 15;


                system(&quot;cls&quot;);
                x = x - 15;
                map[x] = &#039;A&#039;;
                strcpy(str, map.c_str());
                printf(&quot;%s\n&quot;, str);


                system(&quot;cls&quot;);
                y = x + 15;
                map[y] = &#039;w&#039;;
                strcpy(str, map.c_str());
                printf(&quot;%s\n&quot;, str);


                Sleep(200);


            }


            if (GetAsyncKeyState(VK_LEFT) &amp; 0x8000)


            {


                y = y + 1;


                system(&quot;cls&quot;);
                x = x - 1;
                map[x] = &#039;A&#039;;
                strcpy(str, map.c_str());
                printf(&quot;%s\n&quot;, str);


                system(&quot;cls&quot;);
                y = x + 1;
                map[y] = &#039;w&#039;;
                strcpy(str, map.c_str());
                printf(&quot;%s\n&quot;, str);


                Sleep(200);
            }


            if (GetAsyncKeyState(VK_DOWN) &amp; 0x8000)
            {






                y = y - 15;


                system(&quot;cls&quot;);
                x = x + 15;
                map[x] = &#039;A&#039;;
                strcpy(str, map.c_str());
                printf(&quot;%s\n&quot;, str);


                system(&quot;cls&quot;);
                y = x - 15;
                map[y] = &#039;w&#039;;
                strcpy(str, map.c_str());
                printf(&quot;%s\n&quot;, str);


                Sleep(200);


            }




            if (GetAsyncKeyState(VK_RIGHT) &amp; 0x8000)


            {


                y = y - 1;


                system(&quot;cls&quot;);
                x = x + 1;
                map[x] = &#039;A&#039;;
                strcpy(str, map.c_str());
                printf(&quot;%s\n&quot;, str);


                system(&quot;cls&quot;);
                y = x - 1;
                map[y] = &#039;w&#039;;
                strcpy(str, map.c_str());
                printf(&quot;%s\n&quot;, str);


                Sleep(200);
            }


            if (x == 0 || x == 15 || x == 30 || x == 45 || x == 60 || x == 75 || x == 90 || x == 105 || x == 120)
            {
                system(&quot;cls&quot;);
                x = x + 1;
                map[x] = &#039;A&#039;;
                map[x - 1] = &#039;M&#039;;
                strcpy(str, map.c_str());
                printf(&quot;%s\n&quot;, str);
                printf(&quot;山へは入れない&quot;);
                Sleep(1000);
                system(&quot;cls&quot;);
                printf(&quot;%s\n&quot;, str);




            }


            if (x == 13)
            {
                z++;
                x = x + 15;
                map[13] = &#039;T&#039;;
            }
        }


        //町用処理
        while (z == 2) {










            //町メニュー
            if (GetAsyncKeyState(VK_ESCAPE) &amp; 0x8000)
            {
                Sleep(300);
                system(&quot;cls&quot;);
                printf(&quot;メニュー\n\n&quot;);
                printf(&quot;1 持ち物\n2 ステータス\n3 とじる\n\nどれを開きますか?　＞&quot;);
                Sleep(300);
                scanf(&quot;%d&quot;, &amp;MENU2);
                //持ち物
                if (MENU2 == 1) {
                    system(&quot;cls&quot;);
                    if (yakusou == 0 &amp;&amp; kimera == 0) { printf(&quot;持ち物はありません&quot;); }
                    if (yakusou != 0) { printf(&quot;1 薬草x%d\n&quot;, yakusou); }
                    if (kimera != 0) { printf(&quot;2 キメラのつばさx%d\n&quot;, kimera); }
                    if (yakusou != 0 || kimera != 0) {
                        printf(&quot;3 なにもつかわない\n\n&quot;);
                        printf(&quot;なにをつかいますか？　＞&quot;);
                        Sleep(300);
                        scanf(&quot;%d&quot;, &amp;i);
                        if (i == 1 &amp;&amp; yakusou != 0) {


                            HP = HP + 10;
                            yakusou = yakusou - 1;
                            while (getchar() != &#039;\n&#039;);
                            printf(&quot;HPが　かいふくした\n&quot;);


                            if (LV == 1 &amp;&amp; HP &gt; 15) { HP = 15; }
                            if (LV == 2 &amp;&amp; HP &gt; 17) { HP = 17; }
                            if (LV == 3 &amp;&amp; HP &gt; 20) { HP = 20; }


                            i = 0;
                        }
                        if (i == 2 &amp;&amp; kimera != 0) { while (getchar() != &#039;\n&#039;);  printf(&quot;いまはつかえない&quot;); i = 0; }


                        if (i == 3) {
                            while (getchar() != &#039;\n&#039;); printf(&quot; &quot;); i = 0;
                        }
                    }
                    MENU2 = 0;
                }
                //ステータス
                if (MENU2 == 2) {
                    system(&quot;cls&quot;);
                    printf(&quot;HP %d\n&quot;, HP);
                    printf(&quot;ATK %d\n&quot;, ATK);
                    printf(&quot;DEF %d\n&quot;, DEF);
                    printf(&quot;EXP %d\n&quot;, EXP);
                    printf(&quot;LV  %d\n\n&quot;, LV);
                    printf(&quot;%dG&quot;, money);
                    MENU2 = 0;
                }
                //とじる


                if (MENU2 == 3) {
                    Sleep(300);
                    system(&quot;cls&quot;);
                    printf(&quot;DELETEを押してください&quot;);
                    MENU2 = 0;
                }


                menu2 = menu2 + 1;


            }


            if (menu2 &gt; 1) {


                if (GetAsyncKeyState(VK_DELETE) &amp; 0x8000)
                {
                    Sleep(300);
                    system(&quot;cls&quot;);


                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);
                    menu = menu - 1;




                }
            }






            if (q == 1) {


                system(&quot;cls&quot;);
                map2[x2] = &#039;A&#039;;
                strcpy(str2, map2.c_str());




                printf(&quot;%s\n&quot;, str2);
                q = q + 1;
            }


            //町での移動


            if (x2 != 19 &amp;&amp; x2 != 9 &amp;&amp; x2 != 10 &amp;&amp; x2 != 12 &amp;&amp; x2 != 13) {


                if (GetAsyncKeyState(VK_UP) &amp; 0x8000)
                {






                    y2 = y2 + 8;


                    system(&quot;cls&quot;);
                    x2 = x2 - 8;
                    map2[x2] = &#039;A&#039;;
                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);


                    system(&quot;cls&quot;);
                    y2 = x2 + 8;
                    map2[y2] = &#039;l&#039;;
                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);


                    Sleep(200);


                };
            }




            if (x2 != 9 &amp;&amp; x2 != 17 &amp;&amp; x2 != 12) {


                if (GetAsyncKeyState(VK_LEFT) &amp; 0x8000)


                {


                    y2 = y2 + 1;


                    system(&quot;cls&quot;);
                    x2 = x2 - 1;
                    map2[x2] = &#039;A&#039;;
                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);


                    system(&quot;cls&quot;);
                    y2 = x2 + 1;
                    map2[y2] = &#039;l&#039;;
                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);


                    Sleep(200);
                };
            }




            if (x2 != 17 &amp;&amp; x2 != 18 &amp;&amp; x2 != 20 &amp;&amp; x2 != 21) {


                if (GetAsyncKeyState(VK_DOWN) &amp; 0x8000)
                {






                    y2 = y2 - 7;


                    system(&quot;cls&quot;);
                    x2 = x2 + 8;
                    map2[x2] = &#039;A&#039;;
                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);


                    system(&quot;cls&quot;);
                    y2 = x2 - 8;
                    map2[y2] = &#039;l&#039;;
                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);


                    Sleep(200);


                };
            }




            if (x2 != 10 &amp;&amp; x2 != 13 &amp;&amp; x2 != 21) {


                if (GetAsyncKeyState(VK_RIGHT) &amp; 0x8000)


                {


                    y2 = y2 - 1;


                    system(&quot;cls&quot;);
                    x2 = x2 + 1;
                    map2[x2] = &#039;A&#039;;
                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);


                    system(&quot;cls&quot;);
                    y2 = x2 - 1;
                    map2[y2] = &#039;l&#039;;
                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);


                    Sleep(200);
                };
            }


            if (x2 == 27) {
                z = z - 1;
                q = q - 1;


                system(&quot;cls&quot;);
                map[x] = &#039;A&#039;;
                strcpy(str, map.c_str());
                printf(&quot;%s\n&quot;, str);
                x2 = x2 - 8;
                strcpy(str2, map2.c_str());
                map2[27] = &#039;o&#039;;
            }


            //買い物
            if (x2 == 19 &amp;&amp; GetAsyncKeyState(VK_RETURN) &amp; 0x8000 &amp;&amp; shop == 1)
            {
                Sleep(500);
                system(&quot;cls&quot;);
                printf(&quot;道具屋\n\n1 薬草            5G\n2 キメラのつばさ 15G\n3 用はない\n\n何を買いますか？ ＞&quot;);
                Sleep(300);
                scanf(&quot;%d&quot;, &amp;SHOP);




                if (SHOP == 1 &amp;&amp; money &gt; 5) {
                    yakusou++;
                    money = money - 5;
                    system(&quot;cls&quot;);
                    while (getchar() != &#039;\n&#039;);
                    printf(&quot;薬草を買いました\n残りの所持金は%dGです&quot;, money);
                    while (getchar() != &#039;\n&#039;);
                    Sleep(900);
                    system(&quot;cls&quot;);


                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);
                    shop = shop - 1;


                    SHOP = 0;
                }


                if (SHOP == 2 &amp;&amp; money &gt; 15) {
                    kimera++;
                    money = money - 15;
                    system(&quot;cls&quot;);
                    while (getchar() != &#039;\n&#039;);
                    printf(&quot;キメラの翼を買いました\n残りの所持金は%dGです&quot;, money);
                    while (getchar() != &#039;\n&#039;);
                    Sleep(900);
                    system(&quot;cls&quot;);


                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);
                    shop = shop - 1;
                    SHOP = 0;
                }








                shop = shop + 1;


            }


            if (shop == 2) {


                if (GetAsyncKeyState(VK_DELETE) &amp; 0x8000)
                {
                    Sleep(300);
                    system(&quot;cls&quot;);


                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);
                    shop = shop - 1;




                }
            }


&quot;)















        }
    }
}    </description>
    <dc:date>2017-11-28T07:40:52+09:00</dc:date>
    <utime>1511822452</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/memoyoushi/pages/1.html">
    <title>トップページ</title>
    <link>https://w.atwiki.jp/memoyoushi/pages/1.html</link>
    <description>
      #include&lt;stdio.h&gt;
#include&lt;string.h&gt;
#include&lt;windows.h&gt;
#include&lt;string&gt;
#include&lt;iostream&gt;
#include&lt;stdlib.h&gt;
#include&lt;time.h&gt;




char x = 66;
char y = 66;
char x2 = 19;
char z = 1;
char q = 1;
char y2 = 19;
char menu = 1;
char menu2 = 1;
char shop = 1;
int money = 100;
char item;
int MENU;
int MENU2;
char SHOP;
int yakusou = 0;
int kimera = 0;
int HP = 15;
int ATK = 5;
int DEF = 5;
int EXP = 0;
int LV = 1;
int enemyHP = 3;
int enemyATK = 7;
int enemyDEF = 4;
int battle;
int battle2;
int battle3;
int nigeru;
int s = 0;
int i = 5;
int s2 = 0;












using namespace std;


int main() {


    //フィールドマップ


    char str[1000];


    string map;


    map = &quot;MwwwwwwwwwwwwT\nMwwwwwwwwwwwww\nMwwwwwwwwwwwww\nMwwwwwwwwwwwww\nMwwwwwwwwwwwww\nMwwwwwwwwwwwww\nMwwwwwwwwwwwww\nMwwwwwwwwwwwww\nMwwwwwwwwwwwww\n&quot;;




    map[x] = &#039;A&#039;;
    strcpy(str, map.c_str());
    printf(&quot;%s\n&quot;, str);


    //町マップ


    char str2[1000];


    string map2;


    map2 = &quot;EEEEEEE\nEllSllE\nElllllE\nEEEoEEE\n&quot;;






    char up = 0;
    char left = 0;
    char right = 0;
    char down = 0;


    while (1) {


        //フィールド用処理
        while (z == 1) {


            //フィールドメニュー
            if (GetAsyncKeyState(VK_ESCAPE) &amp; 0x8000)
            {
                Sleep(300);
                system(&quot;cls&quot;);
                printf(&quot;メニュー\n\n&quot;);
                printf(&quot;1 持ち物\n2 ステータス\n3 とじる\n\nどれを開きますか?　＞&quot;);
                Sleep(300);
                scanf(&quot;%d&quot;, &amp;MENU);
                //持ち物
                if (MENU == 1) {


                    system(&quot;cls&quot;);
                    if (yakusou == 0 &amp;&amp; kimera == 0) { printf(&quot;持ち物はありません&quot;); }
                    if (yakusou != 0) { printf(&quot;1 薬草x%d\n&quot;, yakusou); }
                    if (kimera != 0) { printf(&quot;2 キメラのつばさx%d\n&quot;, kimera); }
                    if (yakusou != 0 || kimera != 0) {
                        printf(&quot;3 なにもつかわない\n\n&quot;);
                        printf(&quot;なにをつかいますか？　＞&quot;);
                        Sleep(300);
                        scanf(&quot;%d&quot;, &amp;i);
                        if (i == 1 &amp;&amp; yakusou != 0) {


                            HP = HP + 10;
                            yakusou = yakusou - 1;
                            while (getchar() != &#039;\n&#039;);
                            printf(&quot;HPが　かいふくした\n&quot;);


                            if (LV == 1 &amp;&amp; HP &gt; 15) { HP = 15; }
                            if (LV == 2 &amp;&amp; HP &gt; 17) { HP = 17; }
                            if (LV == 3 &amp;&amp; HP &gt; 20) { HP = 20; }
                            i = 0;


                        }
                        if (i == 2 &amp;&amp; kimera != 0) { while (getchar() != &#039;\n&#039;);  printf(&quot;いまはつかえない&quot;); i = 0; }


                        if (i == 3) {
                            while (getchar() != &#039;\n&#039;); printf(&quot; &quot;);
                            i = 0;
                        }


                    }MENU = 0;
                }
                //ステータス
                if (MENU == 2) {
                    system(&quot;cls&quot;);
                    printf(&quot;HP %d\n&quot;, HP);
                    printf(&quot;ATK %d\n&quot;, ATK);
                    printf(&quot;DEF %d\n&quot;, DEF);
                    printf(&quot;EXP %d\n&quot;, EXP);
                    printf(&quot;LV  %d\n\n&quot;, LV);
                    printf(&quot;%dG&quot;, money);
                    MENU = 0;


                }
                //とじる
                if (MENU == 3) {
                    system(&quot;cls&quot;);
                    printf(&quot;DELETEを押してください&quot;);
                    MENU = 0;
                }


                menu++;


            }


            if (menu == 2) {


                if (GetAsyncKeyState(VK_DELETE) &amp; 0x8000)
                {
                    Sleep(300);
                    system(&quot;cls&quot;);


                    strcpy(str, map.c_str());
                    printf(&quot;%s\n&quot;, str);
                    menu = menu - 1;




                }
            }


            //フィールド移動
            if (GetAsyncKeyState(VK_UP) &amp; 0x8000)
            {
                //戦闘
                srand((unsigned)time(NULL));
                battle = rand() % 9 + 1;


                if (battle == 1) {
                    s++;
                    s2++;
                    system(&quot;cls&quot;);
                    printf(&quot;敵が現れた\n\n\n&quot;);
                    printf(&quot;　　　　　　　　　 i⌒i\n&quot;);
                    printf(&quot;　　　　　　　　　 |  |\n&quot;);
                    printf(&quot;　　 　　　    ,,ｒ’‘ヽ\n&quot;);
                    printf(&quot;　　　　　    r‐”　　 　 ヽ､\n&quot;);
                    printf(&quot;　　　  　  ／　 　　　　 　　＼\n&quot;);
                    printf(&quot;　　　     /  　（ ･ ）（ ･ ）　ヽ\n&quot;);
                    printf(&quot;　　　    |　 　 ,-､　　　,-､　  |\n&quot;);
                    printf(&quot;　　      ヽ　   ヽ､ ￣￣　ノ　　/\n&quot;);
                    printf(&quot;　　　　   `-､　　｀￣￣´　 　／\n&quot;);
                    printf(&quot;　　  　　　　 ￣￣￣￣￣￣￣\n&quot;);


                    printf(&quot;\n1 戦う\n2 逃げる\n\nどちらにしますか?　＞&quot;);
                    Sleep(300);
                    scanf(&quot;%d&quot;, &amp;battle2);


                    if (battle2 == 1) {
                        //バトル処理


                        do {
                            system(&quot;cls&quot;);
                            printf(&quot;　　　　　　　　　 i⌒i\n&quot;);
                            printf(&quot;　　　　　　　　　 |  |\n&quot;);
                            printf(&quot;　　 　　　    ,,ｒ’‘ヽ\n&quot;);
                            printf(&quot;　　　　　    r‐”　　 　 ヽ､\n&quot;);
                            printf(&quot;　　　  　  ／　 　　　　 　　＼\n&quot;);
                            printf(&quot;　　　     /  　（ ･ ）（ ･ ）　ヽ\n&quot;);
                            printf(&quot;　　　    |　 　 ,-､　　　,-､　  |\n&quot;);
                            printf(&quot;　　      ヽ　   ヽ､ ￣￣　ノ　　/\n&quot;);
                            printf(&quot;　　　　   `-､　　｀￣￣´　 　／\n&quot;);
                            printf(&quot;　　  　　　　 ￣￣￣￣￣￣￣\n&quot;);
                            printf(&quot;自分　HP%d\n&quot;, HP);
                            printf(&quot;1 こうげき\n2 アイテム\n3 にげる\n\n&quot;);
                            printf(&quot;どうしますか？　＞&quot;);


                            Sleep(300);
                            scanf(&quot;%d&quot;, &amp;battle3);


                            if (battle3 == 1) {
                                enemyHP = enemyHP - (ATK - enemyDEF);
                                system(&quot;cls&quot;);
                                while (getchar() != &#039;\n&#039;);
                                printf(&quot;%dのダメージをあたえた\n&quot;, ATK - enemyDEF);
                                if (enemyHP &lt; 1) {


                                    s2 = s2 - 1;


                                }battle3 = 0;
                            }
                            if (battle3 == 2) {
                                system(&quot;cls&quot;);
                                while (getchar() != &#039;\n&#039;);
                                if (yakusou == 0 &amp;&amp; kimera == 0) { printf(&quot;持ち物はありません&quot;); }
                                if (yakusou != 0) { printf(&quot;1 薬草x%d\n&quot;, yakusou); }
                                if (kimera != 0) { printf(&quot;2 キメラのつばさx%d\n&quot;, kimera); }
                                if (yakusou != 0 || kimera != 0) {
                                    printf(&quot;3 なにもつかわない\n\n&quot;);
                                    printf(&quot;なにをつかいますか？　＞&quot;);
                                    Sleep(300);
                                    scanf(&quot;%d&quot;, &amp;i);
                                    if (i == 1 &amp;&amp; yakusou != 0) {


                                        HP = HP + 10;
                                        yakusou = yakusou - 1;
                                        while (getchar() != &#039;\n&#039;);
                                        printf(&quot;HPが　かいふくした\n&quot;);


                                        if (LV == 1 &amp;&amp; HP &gt; 15) { HP = 15; }
                                        if (LV == 2 &amp;&amp; HP &gt; 17) { HP = 17; }
                                        if (LV == 3 &amp;&amp; HP &gt; 20) { HP = 20; }
                                        i = 0;


                                    }
                                    if (i == 2 &amp;&amp; kimera != 0) { while (getchar() != &#039;\n&#039;);  printf(&quot;いまはつかえない&quot;); i = 0; }


                                    if (i == 3) {
                                        while (getchar() != &#039;\n&#039;); printf(&quot; &quot;); i = 0;
                                    }


                                }




                                battle3 = 0;
                            }
                            if (battle3 == 3) {
                                srand((unsigned)time(NULL));
                                nigeru = rand() % 2 + 1;
                                if (nigeru != 1) { s = s - 1; }
                                battle3 = 0;
                            }
                            //敵の攻撃


                            if (s2 == 1) {
                                HP = HP - (enemyATK - DEF+3) ;
                                Sleep(1000);


                                while (getchar() != &#039;\n&#039;);
                                printf(&quot;%dのダメージを受けた&quot;, enemyATK - DEF+3);
                                while (getchar() != &#039;\n&#039;);
                                if (HP &lt; 1) {
                                    while (getchar() != &#039;\n&#039;);
                                    printf(&quot;ゲームオーバー&quot;);
                                    while (getchar() != &#039;\n&#039;); abort();
                                }


                            }
                            if (s2 == 0) {
                                Sleep(1000);
                                while (getchar() != &#039;\n&#039;);
                                printf(&quot;勝利\n&quot;);
                                printf(&quot;２のけいけんちをえた&quot;);
                                while (getchar() != &#039;\n&#039;);


                                EXP = EXP + 2;
                                if (LV == 1 &amp;&amp; EXP &gt; 2) {
                                    LV++; ATK++; DEF++; HP = HP + 2;
                                    while (getchar() != &#039;\n&#039;);
                                    printf(&quot;レベルアップ！\nこうげき　が　1　あがった\n&quot;);
                                    printf(&quot;ぼうぎょ　が　１　あがった\n&quot;);
                                    printf(&quot;たいりょく　が　２　あがった\n&quot;);


                                }




                                if (LV == 2 &amp;&amp; EXP &gt; 5) {
                                    LV++; ATK = ATK + 2; DEF = DEF + 3; HP = HP + 3;
                                    while (getchar() != &#039;\n&#039;);
                                    printf(&quot;レベルアップ！\nこうげき　が　２　あがった\n&quot;);
                                    printf(&quot;ぼうぎょ　が　３　あがった\n&quot;);
                                    printf(&quot;たいりょく　が　３　あがった\n&quot;);


                                }






                                s = s - 1;
                            }




                        } while (s == 1);
                        enemyHP = 3;
                        //フィールドに戻る
                        system(&quot;cls&quot;);


                        strcpy(str, map.c_str());
                        printf(&quot;%s\n&quot;, str);
                        battle2 = 0;






                    }


                    if (battle2 == 2) {
                        srand((unsigned)time(NULL));
                        nigeru = rand() % 2 + 1;
                        if (nigeru != 1) {
                            //フィールドに戻る
                            system(&quot;cls&quot;);


                            strcpy(str, map.c_str());
                            printf(&quot;%s\n&quot;, str);
                        }
                        if (nigeru == 1) {
                            system(&quot;cls&quot;);
                            while (getchar() != &#039;\n&#039;);  printf(&quot;逃げられなかった&quot;);
                            //バトル処理


                        }
                        battle2 = 0;
                    }


                }
                //戦闘終了




                y = y + 15;


                system(&quot;cls&quot;);
                x = x - 15;
                map[x] = &#039;A&#039;;
                strcpy(str, map.c_str());
                printf(&quot;%s\n&quot;, str);


                system(&quot;cls&quot;);
                y = x + 15;
                map[y] = &#039;w&#039;;
                strcpy(str, map.c_str());
                printf(&quot;%s\n&quot;, str);


                Sleep(200);


            }


            if (GetAsyncKeyState(VK_LEFT) &amp; 0x8000)


            {


                y = y + 1;


                system(&quot;cls&quot;);
                x = x - 1;
                map[x] = &#039;A&#039;;
                strcpy(str, map.c_str());
                printf(&quot;%s\n&quot;, str);


                system(&quot;cls&quot;);
                y = x + 1;
                map[y] = &#039;w&#039;;
                strcpy(str, map.c_str());
                printf(&quot;%s\n&quot;, str);


                Sleep(200);
            }


            if (GetAsyncKeyState(VK_DOWN) &amp; 0x8000)
            {






                y = y - 15;


                system(&quot;cls&quot;);
                x = x + 15;
                map[x] = &#039;A&#039;;
                strcpy(str, map.c_str());
                printf(&quot;%s\n&quot;, str);


                system(&quot;cls&quot;);
                y = x - 15;
                map[y] = &#039;w&#039;;
                strcpy(str, map.c_str());
                printf(&quot;%s\n&quot;, str);


                Sleep(200);


            }




            if (GetAsyncKeyState(VK_RIGHT) &amp; 0x8000)


            {


                y = y - 1;


                system(&quot;cls&quot;);
                x = x + 1;
                map[x] = &#039;A&#039;;
                strcpy(str, map.c_str());
                printf(&quot;%s\n&quot;, str);


                system(&quot;cls&quot;);
                y = x - 1;
                map[y] = &#039;w&#039;;
                strcpy(str, map.c_str());
                printf(&quot;%s\n&quot;, str);


                Sleep(200);
            }


            if (x == 0 || x == 15 || x == 30 || x == 45 || x == 60 || x == 75 || x == 90 || x == 105 || x == 120)
            {
                system(&quot;cls&quot;);
                x = x + 1;
                map[x] = &#039;A&#039;;
                map[x - 1] = &#039;M&#039;;
                strcpy(str, map.c_str());
                printf(&quot;%s\n&quot;, str);
                printf(&quot;山へは入れない&quot;);
                Sleep(1000);
                system(&quot;cls&quot;);
                printf(&quot;%s\n&quot;, str);




            }


            if (x == 13)
            {
                z++;
                x = x + 15;
                map[13] = &#039;T&#039;;
            }
        }


        //町用処理
        while (z == 2) {










            //町メニュー
            if (GetAsyncKeyState(VK_ESCAPE) &amp; 0x8000)
            {
                Sleep(300);
                system(&quot;cls&quot;);
                printf(&quot;メニュー\n\n&quot;);
                printf(&quot;1 持ち物\n2 ステータス\n3 とじる\n\nどれを開きますか?　＞&quot;);
                Sleep(300);
                scanf(&quot;%d&quot;, &amp;MENU2);
                //持ち物
                if (MENU2 == 1) {
                    system(&quot;cls&quot;);
                    if (yakusou == 0 &amp;&amp; kimera == 0) { printf(&quot;持ち物はありません&quot;); }
                    if (yakusou != 0) { printf(&quot;1 薬草x%d\n&quot;, yakusou); }
                    if (kimera != 0) { printf(&quot;2 キメラのつばさx%d\n&quot;, kimera); }
                    if (yakusou != 0 || kimera != 0) {
                        printf(&quot;3 なにもつかわない\n\n&quot;);
                        printf(&quot;なにをつかいますか？　＞&quot;);
                        Sleep(300);
                        scanf(&quot;%d&quot;, &amp;i);
                        if (i == 1 &amp;&amp; yakusou != 0) {


                            HP = HP + 10;
                            yakusou = yakusou - 1;
                            while (getchar() != &#039;\n&#039;);
                            printf(&quot;HPが　かいふくした\n&quot;);


                            if (LV == 1 &amp;&amp; HP &gt; 15) { HP = 15; }
                            if (LV == 2 &amp;&amp; HP &gt; 17) { HP = 17; }
                            if (LV == 3 &amp;&amp; HP &gt; 20) { HP = 20; }


                            i = 0;
                        }
                        if (i == 2 &amp;&amp; kimera != 0) { while (getchar() != &#039;\n&#039;);  printf(&quot;いまはつかえない&quot;); i = 0; }


                        if (i == 3) {
                            while (getchar() != &#039;\n&#039;); printf(&quot; &quot;); i = 0;
                        }
                    }
                    MENU2 = 0;
                }
                //ステータス
                if (MENU2 == 2) {
                    system(&quot;cls&quot;);
                    printf(&quot;HP %d\n&quot;, HP);
                    printf(&quot;ATK %d\n&quot;, ATK);
                    printf(&quot;DEF %d\n&quot;, DEF);
                    printf(&quot;EXP %d\n&quot;, EXP);
                    printf(&quot;LV  %d\n\n&quot;, LV);
                    printf(&quot;%dG&quot;, money);
                    MENU2 = 0;
                }
                //とじる


                if (MENU2 == 3) {
                    Sleep(300);
                    system(&quot;cls&quot;);
                    printf(&quot;DELETEを押してください&quot;);
                    MENU2 = 0;
                }


                menu2 = menu2 + 1;


            }


            if (menu2 &gt; 1) {


                if (GetAsyncKeyState(VK_DELETE) &amp; 0x8000)
                {
                    Sleep(300);
                    system(&quot;cls&quot;);


                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);
                    menu = menu - 1;




                }
            }






            if (q == 1) {


                system(&quot;cls&quot;);
                map2[x2] = &#039;A&#039;;
                strcpy(str2, map2.c_str());




                printf(&quot;%s\n&quot;, str2);
                q = q + 1;
            }


            //町での移動


            if (x2 != 19 &amp;&amp; x2 != 9 &amp;&amp; x2 != 10 &amp;&amp; x2 != 12 &amp;&amp; x2 != 13) {


                if (GetAsyncKeyState(VK_UP) &amp; 0x8000)
                {






                    y2 = y2 + 8;


                    system(&quot;cls&quot;);
                    x2 = x2 - 8;
                    map2[x2] = &#039;A&#039;;
                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);


                    system(&quot;cls&quot;);
                    y2 = x2 + 8;
                    map2[y2] = &#039;l&#039;;
                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);


                    Sleep(200);


                };
            }




            if (x2 != 9 &amp;&amp; x2 != 17 &amp;&amp; x2 != 12) {


                if (GetAsyncKeyState(VK_LEFT) &amp; 0x8000)


                {


                    y2 = y2 + 1;


                    system(&quot;cls&quot;);
                    x2 = x2 - 1;
                    map2[x2] = &#039;A&#039;;
                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);


                    system(&quot;cls&quot;);
                    y2 = x2 + 1;
                    map2[y2] = &#039;l&#039;;
                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);


                    Sleep(200);
                };
            }




            if (x2 != 17 &amp;&amp; x2 != 18 &amp;&amp; x2 != 20 &amp;&amp; x2 != 21) {


                if (GetAsyncKeyState(VK_DOWN) &amp; 0x8000)
                {






                    y2 = y2 - 7;


                    system(&quot;cls&quot;);
                    x2 = x2 + 8;
                    map2[x2] = &#039;A&#039;;
                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);


                    system(&quot;cls&quot;);
                    y2 = x2 - 8;
                    map2[y2] = &#039;l&#039;;
                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);


                    Sleep(200);


                };
            }




            if (x2 != 10 &amp;&amp; x2 != 13 &amp;&amp; x2 != 21) {


                if (GetAsyncKeyState(VK_RIGHT) &amp; 0x8000)


                {


                    y2 = y2 - 1;


                    system(&quot;cls&quot;);
                    x2 = x2 + 1;
                    map2[x2] = &#039;A&#039;;
                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);


                    system(&quot;cls&quot;);
                    y2 = x2 - 1;
                    map2[y2] = &#039;l&#039;;
                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);


                    Sleep(200);
                };
            }


            if (x2 == 27) {
                z = z - 1;
                q = q - 1;


                system(&quot;cls&quot;);
                map[x] = &#039;A&#039;;
                strcpy(str, map.c_str());
                printf(&quot;%s\n&quot;, str);
                x2 = x2 - 8;
                strcpy(str2, map2.c_str());
                map2[27] = &#039;o&#039;;
            }


            //買い物
            if (x2 == 19 &amp;&amp; GetAsyncKeyState(VK_RETURN) &amp; 0x8000 &amp;&amp; shop == 1)
            {
                Sleep(500);
                system(&quot;cls&quot;);
                printf(&quot;道具屋\n\n1 薬草            5G\n2 キメラのつばさ 15G\n3 用はない\n\n何を買いますか？ ＞&quot;);
                Sleep(300);
                scanf(&quot;%d&quot;, &amp;SHOP);




                if (SHOP == 1 &amp;&amp; money &gt; 5) {
                    yakusou++;
                    money = money - 5;
                    system(&quot;cls&quot;);
                    while (getchar() != &#039;\n&#039;);
                    printf(&quot;薬草を買いました\n残りの所持金は%dGです&quot;, money);
                    while (getchar() != &#039;\n&#039;);
                    Sleep(900);
                    system(&quot;cls&quot;);


                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);
                    shop = shop - 1;


                    SHOP = 0;
                }


                if (SHOP == 2 &amp;&amp; money &gt; 15) {
                    kimera++;
                    money = money - 15;
                    system(&quot;cls&quot;);
                    while (getchar() != &#039;\n&#039;);
                    printf(&quot;キメラの翼を買いました\n残りの所持金は%dGです&quot;, money);
                    while (getchar() != &#039;\n&#039;);
                    Sleep(900);
                    system(&quot;cls&quot;);


                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);
                    shop = shop - 1;
                    SHOP = 0;
                }








                shop = shop + 1;


            }


            if (shop == 2) {


                if (GetAsyncKeyState(VK_DELETE) &amp; 0x8000)
                {
                    Sleep(300);
                    system(&quot;cls&quot;);


                    strcpy(str2, map2.c_str());
                    printf(&quot;%s\n&quot;, str2);
                    shop = shop - 1;




                }
            }


















        }
    }
}















**@wikiへようこそ
-ウィキはみんなで気軽にホームページ編集できるツールです。
-このページは自由に編集することができます。
-メールで送られてきたパスワードを用いてログインすることで、各種変更（サイト名、トップページ、メンバー管理、サイドページ、デザイン、ページ管理、等）することができます

**まずはこちらをご覧ください。
-[[@wikiの基本操作&gt;&gt;http://www1.atwiki.jp/guide/pages/11.html]]
-[[編集モード・構文一覧表&gt;&gt;http://www1.atwiki.jp/guide/pages/137.html]]
-[[@wikiの設定・管理&gt;&gt;http://www1.atwiki.jp/guide/pages/36.html]]

**分からないことは？
-[[@wiki ご利用ガイド&gt;&gt;http://atwiki.jp/guide/]]
-[[よくある質問&gt;&gt;http://www1.atwiki.jp/guide/pages/21.html]]
-[[@wiki更新情報&gt;&gt;http://www1.atwiki.jp/guide/pages/143.html]]
-[[@wikiへのお問合せフォーム&gt;&gt;https://atwiki.zendesk.com/hc/ja]]
等をご活用ください

**[[アットウィキモードでの編集方法&gt;&gt;http://www1.atwiki.jp/guide/pages/226.html#id_6861418f]]
-[[文字入力&gt;&gt;http://www1.atwiki.jp/guide/pages/228.html]]
-[[画像入力&gt;&gt;http://www1.atwiki.jp/guide/pages/230.html]]
-[[表組み&gt;&gt;http://www1.atwiki.jp/guide/pages/914.html]]

**[[ワープロモードでの編集方法&gt;&gt;http://www1.atwiki.jp/guide/pages/226.html#id_a14c0938]]
-[[文字入力&gt;&gt;http://www1.atwiki.jp/guide/pages/2644.html]]
-[[画像入力&gt;&gt;http://www1.atwiki.jp/guide/pages/2645.html]]
-[[表組み&gt;&gt;http://www1.atwiki.jp/guide/pages/2646.html]]

**その他にもいろいろな機能満載！！
-[[@wikiプラグイン一覧&gt;&gt;http://www1.atwiki.jp/guide/pages/264.html]]
-[[@wikiかんたんプラグイン入力サポート&gt;&gt;http://www1.atwiki.jp/guide/pages/648.html]]

**他のWIKIが気になる方はこちら
-[[プログラミングに関する私的メモ&gt;&gt;https://www46.atwiki.jp/gen3/]]
-[[ハートオブクラウン@wiki&gt;&gt;https://www49.atwiki.jp/hatokura/]]
-[[VIPで初心者がゲーム実況するには@ Wiki&gt;&gt;https://www18.atwiki.jp/live2ch/]]
-[[VPVP wiki&gt;&gt;https://www6.atwiki.jp/vpvpwiki/]]
-[[NEO ZEON    Z-LIMITED&gt;&gt;https://www60.atwiki.jp/z-limited/]]

**バグ・不具合を見つけたら？ 要望がある場合は？
お手数ですが、[[お問合せフォーム&gt;&gt;https://atwiki.zendesk.com/hc/ja]]からご連絡ください。    </description>
    <dc:date>2017-11-28T07:36:43+09:00</dc:date>
    <utime>1511822203</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/memoyoushi/pages/2.html">
    <title>メニュー</title>
    <link>https://w.atwiki.jp/memoyoushi/pages/2.html</link>
    <description>
      **メニュー
-[[トップページ]]
-[[プラグイン紹介&gt;プラグイン]]
-[[メニュー]]
-[[メニュー2]]

----

**リンク
-[[@wiki&gt;&gt;http://atwiki.jp]]
-[[@wikiご利用ガイド&gt;&gt;http://atwiki.jp/guide/]]

// リンクを張るには &quot;[&quot; 2つで文字列を括ります。
// &quot;&gt;&quot; の左側に文字、右側にURLを記述するとリンクになります


//**更新履歴
//#recent(20)

&amp;link_editmenu(text=ここを編集)
    </description>
    <dc:date>2017-11-28T07:34:04+09:00</dc:date>
    <utime>1511822044</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/memoyoushi/pages/3.html">
    <title>右メニュー</title>
    <link>https://w.atwiki.jp/memoyoushi/pages/3.html</link>
    <description>
      **更新履歴
#recent(20)


&amp;link_editmenu2(text=ここを編集)
    </description>
    <dc:date>2017-11-28T07:34:04+09:00</dc:date>
    <utime>1511822044</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/memoyoushi/pages/4.html">
    <title>プラグイン/ニュース</title>
    <link>https://w.atwiki.jp/memoyoushi/pages/4.html</link>
    <description>
      * ニュース
@wikiのwikiモードでは
 #news(興味のある単語)
と入力することで、あるキーワードに関連するニュース一覧を表示することができます
詳しくはこちらをご覧ください。
＝＞http://www1.atwiki.jp/guide/pages/266.html#id_542badf7


-----


たとえば、#news(ゲーム)と入力すると以下のように表示されます。


#news(ゲーム)
    </description>
    <dc:date>2017-11-28T07:34:04+09:00</dc:date>
    <utime>1511822044</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/memoyoushi/pages/5.html">
    <title>プラグイン/編集履歴</title>
    <link>https://w.atwiki.jp/memoyoushi/pages/5.html</link>
    <description>
      * 更新履歴
@wikiのwikiモードでは
 #recent(数字)
と入力することで、wikiのページ更新履歴を表示することができます。
詳しくはこちらをご覧ください。
＝＞http://www1.atwiki.jp/guide/pages/269.html#id_bf9eaeba


-----


たとえば、#recent(20)と入力すると以下のように表示されます。


#recent(20)
    </description>
    <dc:date>2017-11-28T07:34:04+09:00</dc:date>
    <utime>1511822044</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/memoyoushi/pages/6.html">
    <title>プラグイン/アーカイブ</title>
    <link>https://w.atwiki.jp/memoyoushi/pages/6.html</link>
    <description>
      * アーカイブ
@wikiのwikiモードでは
 #archive_log()
と入力することで、特定のウェブページを保存しておくことができます。
詳しくはこちらをご覧ください。
＝＞http://www1.atwiki.jp/guide/pages/921.html#id_2d967d6e


-----


たとえば、#archive_log()と入力すると以下のように表示されます。
保存したいURLとサイト名を入力して&quot;アーカイブログ&quot;をクリックしてみよう


#archive_log()
    </description>
    <dc:date>2017-11-28T07:34:04+09:00</dc:date>
    <utime>1511822044</utime>
  </item>
  </rdf:RDF>
