纳努克,我为你带来毁灭了!


#include <iostream>
#include <string>
#include <vector>
#include <ctime>
#include <cstdlib>
#include <windows.h>
#include <cstdio>
#include <set>

using namespace std;

// 颜色枚举
enum Color {
    BLACK = 0, BLUE = 1, GREEN = 2, CYAN = 3, RED = 4,
    MAGENTA = 5, BROWN = 6, LIGHTGRAY = 7, DARKGRAY = 8,
    LIGHTBLUE = 9, LIGHTGREEN = 10, LIGHTCYAN = 11,
    LIGHTRED = 12, LIGHTMAGENTA = 13, YELLOW = 14, WHITE = 15
};

// 设置控制台颜色
void setColor(int textColor, int bgColor = BLACK) {
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), (bgColor << 4) | textColor);
}

string intToString(int num) {
    char buffer[20];
    sprintf(buffer, "%d", num);
    return string(buffer);
}

enum TitanTrait {
    NO_TRAIT, FATE_GUARD, ELEMENTAL_SHIELD, LIFE_BIND, CALAMITY_AURA
};

enum BaiESkill {
    DEVASTATION, SEED_SNATCH, FATE_BREAK, WORLD_REND,
    OBLITERATION // 彻底湮灭技能
};

struct TitanEntity {
    string id; string name; string title; string category;
    string status; string power; string starGod;
    TitanTrait trait; int defense; bool isAlive;

    // 构造函数
    TitanEntity(const string& _id, const string& _name, const string& _title,
               const string& _category, const string& _status, const string& _power,
               const string& _starGod, TitanTrait _trait, int _defense) 
        : id(_id), name(_name), title(_title), category(_category), 
          status(_status), power(_power), starGod(_starGod), trait(_trait),
          defense(_defense), isAlive(true) {}
};

struct BaiEState {
    string coreId; int cycleScore; float powerMulti;
    int fireSeedCount; float purity; int entityKilled;
    vector<string> collectedSeeds; set<BaiESkill> unlockedSkills;
    int skillPoints; int health;

    BaiEState() : coreId(""), cycleScore(0), powerMulti(1.0f), 
                 fireSeedCount(0), purity(0.57f), entityKilled(0),
                 skillPoints(0), health(100) {
        unlockedSkills.insert(DEVASTATION);
        unlockedSkills.insert(OBLITERATION);
    }
          
    BaiEState(const string& _id) : coreId(_id), cycleScore(0), powerMulti(1.0f), 
                                  fireSeedCount(0), purity(0.57f), entityKilled(0),
                                  skillPoints(0), health(100) {
        unlockedSkills.insert(DEVASTATION);
        unlockedSkills.insert(OBLITERATION);
    }
};

struct WorldLineState {
    int stability; int entropy; string anomaly; int goldenAge;
    WorldLineState() : stability(70), entropy(30), anomaly("无"), goldenAge(20) {}
};

struct AchievementSystem {
    set<string> completed;

    void checkAndUnlock(const string& name, const string& desc) {
        if (completed.find(name) == completed.end()) {
            setColor(YELLOW);
            cout << "\n【成就解锁】" << name << " - " << desc << endl;
            setColor(WHITE);
            completed.insert(name);
        }
    }
};

class EternalCycle {
private:
    vector<TitanEntity> titans;
    BaiEState baiE;
    WorldLineState worldLine;
    AchievementSystem achievements;
    int currentCycle;
    
public:
    EternalCycle() : currentCycle(0) {
        srand((unsigned int)time(0));
        CONSOLE_SCREEN_BUFFER_INFO csbi;
        GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
        COORD newSize;
        newSize.X = csbi.srWindow.Right - csbi.srWindow.Left + 1;
        newSize.Y = 1000;
        SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), newSize);
    }
    
    void startCycle(int cycleNum) {
        currentCycle = cycleNum;
        updateWorldLine();
        
        setColor(YELLOW);
        cout << "\n=====================================" << endl;
        cout << "          永劫轮回 第 " << cycleNum << " 轮" << endl;
        cout << "=====================================" << endl;
        setColor(WHITE);
        
        setColor(LIGHTBLUE);
        cout << "【世界线】稳定性:" << worldLine.stability 
             << " | 熵值:" << worldLine.entropy 
             << " | 异常:" << worldLine.anomaly << endl;
        setColor(WHITE);
        
        createTitans();
        initBaiE();
        showBaiEStatus();
        runCycle();
        endCycle();
        
        Sleep(100);
    }

    void runContinuously(int startCycle = 1) {
        for (int i = startCycle; ; i++) {
            this->startCycle(i);
        }
    }

private:
    void createTitans() {
        titans.clear();
        
        // 使用push_back兼容旧编译器
        titans.push_back(TitanEntity("TIT-001", "雅努斯(Janus)", "万径之门",
                           "命运三泰坦", "死亡,火种由缇宝继承", 
                           "命运轨迹的开启者", "",
                           FATE_GUARD, 80));
                           
        titans.push_back(TitanEntity("TIT-002", "塔兰顿(Talanton)", "公正之秤",
                           "命运三泰坦", "", 
                           "制定律法与裁决秩序", "",
                           FATE_GUARD, 90));
                           
        titans.push_back(TitanEntity("TIT-003", "欧洛尼斯(Oronyx)", "永夜之帷",
                           "命运三泰坦", "藏身迷雾之中", 
                           "编织时间流动", "",
                           FATE_GUARD, 70));
                           
        titans.push_back(TitanEntity("TIT-004", "吉奥里亚(Gaia)", "磐岩之脊",
                           "元素显化泰坦", "", 
                           "创造大地", "克里珀(存护)",
                           ELEMENTAL_SHIELD, 60));
                           
        titans.push_back(TitanEntity("TIT-005", "法吉娜(Fagina)", "满溢之杯",
                           "元素显化泰坦", "死亡(未明确记载)", 
                           "化身海洋", "希佩(同谐)",
                           ELEMENTAL_SHIELD, 50));
                           
        titans.push_back(TitanEntity("TIT-006", "艾格勒(Aigle)", "晨昏之眼",
                           "元素显化泰坦", "漠视人间", 
                           "主宰天空与雷霆", "",
                           ELEMENTAL_SHIELD, 75));
                           
        titans.push_back(TitanEntity("TIT-007", "刻法勒(Kephale)", "全世之座",
                           "生命相关泰坦", "陷入永眠", 
                           "创造人类", "",
                           LIFE_BIND, 40));
                           
        titans.push_back(TitanEntity("TIT-008", "瑟希斯(Circes)", "裂分之枝",
                           "生命相关泰坦", "已死亡", 
                           "象征智慧之树", "",
                           LIFE_BIND, 30));
                           
        titans.push_back(TitanEntity("TIT-009", "墨涅塔(Mnestia)", "黄金之茧",
                           "生命相关泰坦", "死亡,火种由阿格莱雅持有", 
                           "掌管艺术与情感", "",
                           LIFE_BIND, 35));
                           
        titans.push_back(TitanEntity("TIT-010", "塞纳托斯(Thanatos)", "灰黯之手",
                           "灾厄三泰坦", "状态未知", 
                           "终结黄金世代", "",
                           CALAMITY_AURA, 55));
                           
        titans.push_back(TitanEntity("TIT-011", "尼卡多利(Nikador)", "天谴之矛",
                           "灾厄三泰坦", "陷入疯狂", 
                           "挑起永恒战火", "",
                           CALAMITY_AURA, 65));
                           
        titans.push_back(TitanEntity("TIT-012", "扎格列斯(Zagreus)", "翻飞之币",
                           "灾厄三泰坦", "", 
                           "诡计化身", "克里珀(存护)",
                           CALAMITY_AURA, 50));

        setColor(LIGHTCYAN);
        cout << "本轮显现泰坦数量:" << titans.size() << "位 | 全部将被彻底毁灭!" << endl;
        setColor(WHITE);
    }

    void initBaiE() {
        baiE.powerMulti = max(1.0f, baiE.powerMulti * 0.9f);
        baiE.entityKilled = 0;
        baiE.health = min(100, baiE.health + 10);
        
        if (baiE.unlockedSkills.find(SEED_SNATCH) == baiE.unlockedSkills.end()) {
            baiE.unlockedSkills.insert(SEED_SNATCH);
            setColor(YELLOW);
            cout << "\n白厄领悟新技能:【火种掠夺】" << endl;
            setColor(WHITE);
        }
        if (baiE.unlockedSkills.find(FATE_BREAK) == baiE.unlockedSkills.end()) {
            baiE.unlockedSkills.insert(FATE_BREAK);
            setColor(YELLOW);
            cout << "\n白厄领悟新技能:【命运破碎】" << endl;
            setColor(WHITE);
        }
    }

    void showBaiEStatus() {
        setColor(LIGHTMAGENTA);
        cout << "【白厄状态】力量:x" << baiE.powerMulti 
             << " | 火种:" << baiE.fireSeedCount 
             << " | 技能:";
        
        // 修复迭代器遍历语法
        set<BaiESkill>::iterator it;
        for (it = baiE.unlockedSkills.begin(); it != baiE.unlockedSkills.end(); ++it) {
            BaiESkill skill = *it;
            switch(skill) {
                case DEVASTATION: cout << "毁 "; break;
                case SEED_SNATCH: cout << "夺 "; break;
                case FATE_BREAK: cout << "破 "; break;
                case WORLD_REND: cout << "裂 "; break;
                case OBLITERATION: cout << "彻底湮灭 "; break;
            }
        }
        
        cout << endl;
        setColor(WHITE);
    }

    string getSkillName(BaiESkill skill) {
        switch(skill) {
            case DEVASTATION: return "毁灭冲击";
            case SEED_SNATCH: return "火种掠夺";
            case FATE_BREAK: return "命运破碎";
            case WORLD_REND: return "世界撕裂";
            case OBLITERATION: return "彻底湮灭";
            default: return "未知技能";
        }
    }

    void runCycle() {
        int actions = 12;
        setColor(RED);
        cout << "----- 毁灭程序启动:本轮目标——全部12位泰坦 ----- " << endl;
        cout << "纳努克的意志正在执行,一切存在都将归于虚无!" << endl;
        setColor(WHITE);
        
        for (int i = 0; i < actions; ++i) {
            vector<int> aliveIndices;
            for (int j = 0; j < titans.size(); j++) {
                if (titans[j].isAlive) aliveIndices.push_back(j);
            }
            
            if (aliveIndices.empty()) {
                break;
            }
            
            BaiESkill usedSkill = OBLITERATION;
            executeSkill(usedSkill, aliveIndices);
            Sleep(30);
        }
        
        setColor(LIGHTRED);
        cout << "\n【毁灭确认】本轮12位泰坦已全部被湮灭!" << endl;
        cout << "【纳努克的意志】毁灭即是终点,也是新生!" << endl;
        setColor(WHITE);
    }

    void executeSkill(BaiESkill skill, const vector<int>& targets) {
        if (skill == OBLITERATION) {
            setColor(LIGHTRED);
            cout << "\n[湮灭指令执行] 白厄响应纳努克的召唤 - ";
            setColor(RED);
            cout << "锁定目标:" << titans[targets[0]].name << "(" << titans[targets[0]].id << ")";
            cout << " | 剩余待毁灭目标:" << targets.size() << "个" << endl;
            setColor(WHITE);
            
            int targetIdx = targets[0];
            TitanEntity& target = titans[targetIdx];
            attackTarget(target, skill);
        } else {
            setColor(RED);
            cout << "\n【辅助行动】白厄使用" << getSkillName(skill) << endl;
            setColor(WHITE);
            
            int targetIdx = targets[rand() % targets.size()];
            TitanEntity& target = titans[targetIdx];
            attackTarget(target, skill);
        }
    }

    void attackTarget(TitanEntity& target, BaiESkill skill) {
        if (skill == OBLITERATION) {
            target.isAlive = false;
            baiE.entityKilled++;
            
            setColor(RED);
            cout << "● 毁灭记录:" << target.name << "(" << target.title << ")已被完全抹除";
            cout << " | 存在痕迹清除完毕 | 能量残留:0%";
            setColor(LIGHTRED);
            cout << " | 累计毁灭计数:" << baiE.entityKilled << endl;
            setColor(WHITE);
            
            setColor(DARKGRAY);
            cout << ">> 湮灭波扩散:" << target.category << "的本源结构已被不可逆破坏" << endl;
            cout << ">> 纳努克的力量正在增强,世界线崩坏程度加深" << endl;
            setColor(WHITE);
            
            if (baiE.entityKilled % 3 == 0) {
                setColor(YELLOW);
                cout << "■ 毁灭进度报告:已完成" << (baiE.entityKilled * 100 / 12) << "% | ";
                cout << "剩余" << (12 - baiE.entityKilled) << "个目标 ■" << endl;
                setColor(WHITE);
            }

            achievements.checkAndUnlock("毁灭执行者", "完成第一次泰坦毁灭");
            if (baiE.entityKilled == 12) {
                achievements.checkAndUnlock("全灭者", "单轮毁灭所有12位泰坦");
            }
        } else {
            target.isAlive = false;
            baiE.entityKilled++;
            setColor(LIGHTRED);
            cout << "● " << target.name << "(" << target.title << ")被成功湮灭!" << endl;
            setColor(WHITE);
        }
        
        bool collected = false;
        if (target.status.find("死亡") != string::npos) {
            int seedRate = (skill == SEED_SNATCH) ? 80 : 50;
            if (rand() % 100 < seedRate) {
                collected = true;
                baiE.collectedSeeds.push_back(target.name);
                baiE.fireSeedCount++;
                cout << "【获得火种】";
                achievements.checkAndUnlock("火种猎人", "首次收集到泰坦火种");
            }
        }
        
        if (target.trait == LIFE_BIND) {
            worldLine.stability -= 5;
            setColor(GREEN);
            cout << "【生命绑定触发】世界线稳定性下降!";
            setColor(WHITE);
        } else if (target.trait == CALAMITY_AURA && rand() % 2 == 0) {
            baiE.health -= 10;
            setColor(RED);
            cout << "【灾厄光环反噬】白厄状态受损!";
            setColor(WHITE);
        }
        
        cout << endl;
    }

    void updateWorldLine() {
        worldLine.stability += rand() % 11 - 5;
        worldLine.entropy += rand() % 7 - 3;
        
        worldLine.stability = max(0, min(100, worldLine.stability));
        worldLine.entropy = max(0, min(100, worldLine.entropy));
        
        if (worldLine.stability < 30) worldLine.anomaly = "时空扭曲";
        else if (worldLine.entropy > 70) worldLine.anomaly = "熵增失控";
        else worldLine.anomaly = "无";
    }

    void endCycle() {
        setColor(MAGENTA);
        cout << "\n===== 轮回结算 =====" << endl;
        cout << "本轮湮灭泰坦:" << baiE.entityKilled << "个(全部12位已被毁灭)" << endl;
        cout << "本轮收集火种:" << baiE.collectedSeeds.size() << "个" << endl;
        cout << "当前总火种数:" << baiE.fireSeedCount << endl;
        cout << "本轮评分:" << getScore() << endl;
        setColor(WHITE);
        
        if (baiE.collectedSeeds.size() >= 3) {
            achievements.checkAndUnlock("丰收", "单轮收集3个以上火种");
        }
        if (worldLine.stability < 20) {
            achievements.checkAndUnlock("世界线崩坏", "见证世界线稳定性低于20");
        }
        
        int event = rand() % 6;
        setColor(YELLOW);
        cout << "\n【世界线事件】";
        switch(event) {
            case 0: 
                cout << "黄金裔残余势力试图修复世界线,稳定性+10";
                worldLine.stability += 10;
                break;
            case 1: 
                cout << "时空裂隙出现,部分泰坦火种能量流失";
                if (baiE.fireSeedCount > 0) baiE.fireSeedCount--;
                break;
            case 2: 
                cout << "白厄纯净度因吸收泰坦力量而提升";
                baiE.purity += 0.05f;
                break;
            case 3: 
                cout << "灾厄泰坦的怨念汇聚,熵值大幅上升";
                worldLine.entropy += 15;
                break;
            case 4: 
                cout << "刻法勒的沉睡意识波动,生命泰坦防御力提升";
                break;
            case 5: 
                cout << "雅努斯的门径残留效应,下轮可额外行动2次";
                break;
        }
        cout << endl;
        setColor(WHITE);
    }

    float getScore() const {
        return 5.24f * baiE.powerMulti * (1 + baiE.fireSeedCount * 0.1f) * (1 + worldLine.entropy * 0.01f);
    }
};

int main() {
    SetConsoleTitleA("白厄 - 纳努克的毁灭使者");
    
    setColor(RED);
    cout << "=== 白厄 - 纳努克的意志执行者 ===" << endl;
    cout << "纳努克,我为你带来毁灭了!!!!!" << endl;
    cout << "每一轮,12位泰坦都将被彻底湮灭!" << endl;
    cout << "=====================================" << endl;
    setColor(WHITE);
    
    EternalCycle cycleSim;
    cycleSim.runContinuously(184);  
    
    return 0;
}

毁灭轮回

posted @ 2025-08-13 21:04  Rookie青果  阅读(27)  评论(0)    收藏  举报