gpt4 book ai didi

HarryPotterRPG_1

转载 作者:我是一只小鸟 更新时间:2023-09-24 23:02:27 38 4
gpt4 key购买 nike

RPG——Harry Potter

  博主最近迷上了《Harry Potter》 。

So 我制作了一款RPG对话模拟游戏, 。

目前主线以进行到了分院以后:

有兴趣的小伙伴可以看看,能点个关注就更好了\(>_<)/ 。

  以下是程序的准备  。

                          #include<bits/stdc++.h>
                          
                            
#include
                          
                          <conio.h>
                          
                            
#include
                          
                          <windows.h>

                          
                            using
                          
                          
                            namespace
                          
                          
                             std;

                          
                          
                            struct
                          
                          
                             one{
    
                          
                          
                            string
                          
                          
                             name;
    
                          
                          
                            int
                          
                          
                             s;
    
                          
                          
                            int
                          
                          
                             age;
    
                          
                          
                            //
                          
                          
                            金钱 
                          
                          
                            int
                          
                           money1,money2,money3;
                          
                            //
                          
                          
                            金加隆,银西可,铜纳特
    
                          
                          
                            //
                          
                          
                            魔杖,魔法 
                          
                          
                            int
                          
                          
                             magic;
    
                          
                          
                            int
                          
                           magican[
                          
                            100
                          
                          
                            ];
    
                          
                          
                            int
                          
                          
                             magnum;
    
                          
                          
                            //
                          
                          
                            外观 
                          
                          
                            string
                          
                           _1;
                          
                            //
                          
                          
                            发色 
                          
                          
                            string
                          
                           _2;
                          
                            //
                          
                          
                            皮肤 
                          
                          
                            string
                          
                           _3;
                          
                            //
                          
                          
                            眼睛 
                          
                          
                            string
                          
                           _4;
                          
                            //
                          
                          
                            衣服 
                          
                          
                            string
                          
                          
                             w; 
    
                          
                          
                            //
                          
                          
                            物品
                          
                          
                            int
                          
                           thing[
                          
                            100
                          
                          
                            ];
    
                          
                          
                            int
                          
                          
                             thnum; 
};

                          
                          
                            string
                          
                           se[
                          
                            2
                          
                          ]={
                          
                            "
                          
                          
                            先生
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            女士
                          
                          
                            "
                          
                          }; 
                          
                            //
                          
                          
                            称谓 
                          
                          
                            string
                          
                           adj[
                          
                            2
                          
                          ]={
                          
                            "
                          
                          
                            帅气
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            美丽
                          
                          
                            "
                          
                          };
                          
                            //
                          
                          
                            adj 
                          
                          
                            string
                          
                           mag[
                          
                            8
                          
                          ]={
                          
                            "
                          
                          
                            凤凰尾羽紫衫木魔杖
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            独角兽毛山楂木魔杖
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            雷鸟羽毛雪杉木魔杖
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            火龙神经硬木魔杖
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            独角兽毛雪松木魔杖
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            凤凰尾羽柳木魔杖
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            赤木凤凰尾羽魔杖
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            铁木夜骑尾毛魔杖
                          
                          
                            "
                          
                          
                            }; 

                          
                          
                            string
                          
                           gic[
                          
                            100
                          
                          ]={
                          
                            "
                          
                          
                            除你武器
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            飞来
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            障碍重重
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            护神护卫
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            门牙塞大棒
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            钻心剜骨
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            阿瓦达索命
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            魂魄出窍
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            神锋无影
                          
                          
                            "
                          
                          };
                          
                            //
                          
                          
                            魔法 
                          
                          
                            string
                          
                           thing[
                          
                            4
                          
                          ]={
                          
                            "
                          
                          
                            光轮2001
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            魔法石
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            白鲜香精
                          
                          
                            "
                          
                          }; 
                          
                            //
                          
                          
                            物品 
                          
                          
                            int
                          
                           magn=
                          
                            8
                          
                          ; 
                          
                            //
                          
                          
                            魔杖种类数量 
                          
                          
                            string
                          
                           drink[
                          
                            2
                          
                          ]={
                          
                            "
                          
                          
                            黄油啤酒
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            火焰威士忌
                          
                          
                            "
                          
                          };
                          
                            //
                          
                          
                            饮料种类 
                          
                          
                            int
                          
                           dn=
                          
                            2
                          
                          ;
                          
                            //
                          
                          
                            饮料种类数量 
                          
                          
                            int
                          
                           dw[
                          
                            2
                          
                          ]={
                          
                            5
                          
                          ,
                          
                            10
                          
                          };
                          
                            //
                          
                          
                            饮料价格 
                          
                          
                            string
                          
                           school[
                          
                            6
                          
                          ]={
                          
                            "
                          
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            格兰芬多
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            赫奇帕奇
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            拉文克劳
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            斯莱特林
                          
                          
                            "
                          
                          ,
                          
                            "
                          
                          
                            阿兹卡班
                          
                          
                            "
                          
                          };
                          
                            //
                          
                          
                            五大学院(doge) 
                          
                          
                            int
                          
                          
                             sflag;

                          
                          
                            int
                          
                          
                             life;
one player;
                          
                          
                            //
                          
                          
                            玩家 

                          
                          
                            //
                          
                          
                            转场
                          
                          
                            void
                          
                          
                             jump(){
    
                          
                          
                            for
                          
                          (
                          
                            int
                          
                           i=
                          
                            0
                          
                          ;i<
                          
                            3
                          
                          ;i++
                          
                            ){
        system(
                          
                          
                            "
                          
                          
                            cls
                          
                          
                            "
                          
                          
                            );
        cout
                          
                          <<
                          
                            "
                          
                          
                            ...
                          
                          
                            "
                          
                          <<
                          
                            endl;
        Sleep(
                          
                          
                            800
                          
                          
                            );
        system(
                          
                          
                            "
                          
                          
                            cls
                          
                          
                            "
                          
                          
                            );
        cout
                          
                          <<
                          
                            "
                          
                          
                            ....
                          
                          
                            "
                          
                          <<
                          
                            endl;
        Sleep(
                          
                          
                            800
                          
                          
                            );
    }
} 

                          
                          
                            //
                          
                          
                            随机函数
                          
                          
                            int
                          
                           come(
                          
                            int
                          
                           a,
                          
                            int
                          
                          
                             b){
    srand((
                          
                          
                            int
                          
                          )time(
                          
                            0
                          
                          
                            ));
    
                          
                          
                            return
                          
                           (rand()%(b-a+
                          
                            1
                          
                          ))+
                          
                            a; 
}

                          
                          
                            //
                          
                          
                            歇停 
                          
                          
                            void
                          
                          
                             change(){
    getch();
    system(
                          
                          
                            "
                          
                          
                            cls
                          
                          
                            "
                          
                          
                            );
}
                          
                        

  。

最后此篇关于HarryPotterRPG_1的文章就讲到这里了,如果你想了解更多关于HarryPotterRPG_1的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。

38 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com