原神抽卡3.3流浪者模式(增加了计数系统)

这是一个使用C++编写的原神模拟抽卡程序,包含流浪者、行秋、砂糖和多莉的UP池。用户可以祈愿十次,程序会模拟抽卡过程并显示抽到的角色或武器。
摘要由CSDN通过智能技术生成

#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <time.h>
#include <Windows.h>
using namespace std;
int x,y,chou;
bool card=0,sxbd=0;
int cho[1024];
char up1[64]={"流浪者*****"};
char up2[64]={"行秋****"};
char up3[64]={"砂糖****"};
char up4[64]={"多莉****"};
char oneten;
char a;
int yuanshi=3100; 
int main(){
    sxbd=false;
    cout<<"*****************************"<<endl;
    cout<<"*"<<"     "<<"//原神模拟抽卡//"<<"      "<<"*"<<endl;
    cout<<"*"<<"       "<<"按a祈愿十次"<<"         "<<"*"<<endl;
    cout<<"*"<<"      "<<"*五星up-流浪者*"<<"        "<<"*"<<endl;
    cout<<"*"<<" "<<"四星up-行秋-砂糖-多莉"<<"     "<<"*"<<endl;
    cout<<"*****************************"<<endl;
    cout<<"原石数量"<<yuanshi; 
    cin>>oneten;
    if(yuanshi<1600){
        cout<<"对不起,你的原石不够了,请按1充值"; 
        cin>>a;
        yuanshi=yuanshi+10000;
    }
    else{
        yuanshi=yuanshi-1600;
        if(oneten=='a')
        {
            srand((int)time(NULL));
            for(int q=1;q<=10;++q)
            {
                cho[q]=rand()%741;
            }
            for(int p=1;p<=10;++p)
            {
                if(cho[p]>=24 && cho[p]<=152)
                {
                    sxbd=true;
                }
            } 
            if(sxbd==false)
            {
                cho[10]=rand()%129+25;
            }
            for(int i=1;i<=10;++i)
            {
                //cout<<cho[i]<<" ";
                chou=cho[i]; 
                if(chou>=0 && chou<=9)
                {
                    cout<<"up五星-"<<up1<<endl; 
                }
                if(card==1 && chou>=10 && chou<=23)
                {
                    cout<<"up五星-"<<up1<<endl; 
                    card=false;
                    Sleep(1000); 
                }
                if(chou==10)
                {
                    cout<<"五星-琴*****"<<endl;
                    card=true;
                }
                if(chou==11)
                {
                    cout<<"五星-迪卢克*****"<<endl;
                    card=true;
                }
                if(chou==12)
                {
                    cout<<"五星-七七*****"<<endl;
                    card=true;
      

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值