{"id":19915669,"url":"https://github.com/newbeeyhy/mygame","last_synced_at":"2025-03-01T09:22:14.123Z","repository":{"id":239557571,"uuid":"799883241","full_name":"newbeeyhy/myGame","owner":"newbeeyhy","description":"高级程序设计大作业，塔防游戏","archived":false,"fork":false,"pushed_at":"2024-08-28T09:11:16.000Z","size":29791,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-12T21:44:40.172Z","etag":null,"topics":["cpp","object-oriented-programming","qt"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/newbeeyhy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-13T09:35:24.000Z","updated_at":"2024-09-12T13:42:13.000Z","dependencies_parsed_at":"2024-11-12T21:44:44.010Z","dependency_job_id":"0b03a3ea-f222-4d9d-8a4d-15c5769a90c0","html_url":"https://github.com/newbeeyhy/myGame","commit_stats":null,"previous_names":["newbeeyhy/demo","newbeeyhy/mygame"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newbeeyhy%2FmyGame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newbeeyhy%2FmyGame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newbeeyhy%2FmyGame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newbeeyhy%2FmyGame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/newbeeyhy","download_url":"https://codeload.github.com/newbeeyhy/myGame/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241343600,"owners_count":19947414,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","object-oriented-programming","qt"],"created_at":"2024-11-12T21:41:46.877Z","updated_at":"2025-03-01T09:22:14.098Z","avatar_url":"https://github.com/newbeeyhy.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"项目基于Qt库开发\r\n\r\n## 操作说明\r\n1. 怪物按时间顺序生成，到达终点扣除关卡HP，消灭所有怪物获得胜利。\r\n2. 防御塔使用鼠标拖动到地块上进行部署，每个防御塔消耗100cost，每击杀一个怪物增加50cost。\r\n3. 右侧词缀栏显示我方词缀，每种词缀初始数量为1个，击杀怪物有20%概率随机获得一种词缀。\r\n4. 词缀通过拖动施予我方防御塔，每个防御塔可以装备两个词缀，词缀持续时间无限，一旦装备无法更换。\r\n5. 怪物击杀我方单位同样有20%概率获得随机敌方词缀，敌方词缀会自动为新生成的怪物装备。\r\n6. 敌方词缀最多两个，每当敌方获得新的词缀，若已经拥有两个词缀，会将最早获得的删除，并加入新获得的词缀。\r\n7. 词缀的功能主要为改变数值，获得新的能力。\r\n8. 存档功能，游戏内暂停，并点击“save”，选择保存位置，可以将当前游戏状态保存。\r\n9. 在开始界面点击“Load Game”，选择已有的存档，可以加载之前保存的游戏状态。\r\n10. 倍速功能，初始为一倍速，点击“\u003e\u003e”开启二倍速，点击“\u003e”恢复一倍速。\r\n11. 我方词缀效果介绍：\r\n   - 狂暴：攻击力和生命值翻倍，攻击速度减半。\r\n   - 冰冻：攻击使敌方目标移动速度和攻击速度减半。\r\n   - 放血：攻击会使敌方单位处于流血状态，处于流血状态的敌方单位每秒受到一定的真实伤害。\r\n   - 群攻：可以同时攻击两个敌方单位。\r\n   - 击晕：每次攻击有20%的概率使攻击目标停止行动一秒。\r\n   - 反隐：可以攻击和阻挡迷彩和隐匿的敌方单位。\r\n   - 连击：攻击速度翻倍。\r\n12. 敌方词缀效果介绍：\r\n   - 复生：首次死亡可以复活一次。\r\n   - 活力：生命值翻倍。\r\n   - 坚固：防御力翻倍。\r\n   - 急速：移动速度翻倍。\r\n   - 力量：攻击力翻倍。\r\n   - 削弱：攻击可使我方单位攻击力下降。\r\n   - 亡语：死亡时对以自身为中心的九格中的我方单位造成一次巨额伤害。\r\n   - 隐匿：无法被我方远程单位攻击。\r\n   - 闪现：被阻挡时可以直接移动至我方单位身后，有5秒的冷却时间。\r\n\r\n## 类的继承和派生关系\r\n\r\n```\r\nQDialog\r\n├─ StartMenu\r\n└─ LevelSelectMenu\r\n\r\nQWidget\r\n└─ GameWindow\r\n\r\nQLabel\r\n└─ myObject\r\n   ├─ myBlood\r\n   ├─ myBlock\r\n   └─ myCharacter\r\n      ├─ myTower\r\n      └─ myMonster\r\n\r\nmyProperty\r\n```\r\n\r\n- 对话框类 **StartMenu** 和 **LevelSelectMenu** 继承 **QDialog** 类。\r\n\r\n- 游戏窗口类 **GameWindow** 继承 **QWidget** 类。\r\n\r\n- 实体类 **myObject** 继承 **QLabel** 类，含有虚函数 **act()** 用于派生类重载，**act()** 是实体活动的主要逻辑。\r\n\r\n- **myBlood** 类用于显示单位血条。\r\n\r\n- **myBlock** 类用于显示地块，含有指向存在于地块上的单位的指针，单位之间的交互基本都是通过地块作为中介进行。\r\n\r\n- **myCharacter** 类作为所有敌方和我方单位的基类，拥有指向所在地块的指针，定义了攻击和受击等函数用于实现单位的各种行为。\r\n\r\n- **myTower** 和 **myMonster** 继承 **myCharacter** ，重载了 **act()** 函数用于分别执行双方单位不同的行动逻辑。\r\n\r\n## 文件结构（不包含用于生成和编译的文件）\r\n```\r\ndemo\r\n├─ demo.pro.user\r\n├─ README.md\r\n└─ src\r\n   ├─ demo.pro\r\n   ├─ demo.pro.user\r\n   ├─ gamewindow.cpp\r\n   ├─ gamewindow.h\r\n   ├─ gamewindow.ui\r\n   ├─ gem.ico\r\n   ├─ level\r\n   │  ├─ 1\r\n   │  │  ├─ archer.mst\r\n   │  │  ├─ bat.mst\r\n   │  │  └─ map.mp\r\n   │  ├─ 2\r\n   │  │  ├─ archer1.mst\r\n   │  │  ├─ archer2.mst\r\n   │  │  ├─ archer3.mst\r\n   │  │  ├─ archer4.mst\r\n   │  │  ├─ archer5.mst\r\n   │  │  ├─ bat1.mst\r\n   │  │  ├─ bat2.mst\r\n   │  │  ├─ bat3.mst\r\n   │  │  ├─ bat4.mst\r\n   │  │  ├─ bat5.mst\r\n   │  │  └─ map.mp\r\n   │  ├─ BloodMoonTower.twr\r\n   │  └─ Spirit.twr\r\n   ├─ levelselectmenu.cpp\r\n   ├─ levelselectmenu.h\r\n   ├─ levelselectmenu.ui\r\n   ├─ main.cpp\r\n   ├─ myblock.cpp\r\n   ├─ myblock.h\r\n   ├─ myblood.cpp\r\n   ├─ myblood.h\r\n   ├─ mycharacter.cpp\r\n   ├─ mycharacter.h\r\n   ├─ mymonster.cpp\r\n   ├─ mymonster.h\r\n   ├─ myobject.cpp\r\n   ├─ myobject.h\r\n   ├─ myproperty.cpp\r\n   ├─ myproperty.h\r\n   ├─ mytower.cpp\r\n   ├─ mytower.h\r\n   ├─ recourse\r\n   │  ├─ BGM\r\n   │  │  ├─ Der Hexenkonig.mp3\r\n   │  │  ├─ Founding Stone.mp3\r\n   │  │  ├─ In Originium Covered Fields.mp3\r\n   │  │  ├─ Merciful Broken Sun.mp3\r\n   │  │  └─ shenchizhiying.mp3\r\n   │  ├─ block\r\n   │  │  ├─ c.png\r\n   │  │  ├─ d.png\r\n   │  │  ├─ gc.png\r\n   │  │  ├─ gd.png\r\n   │  │  ├─ gl.png\r\n   │  │  ├─ gld.png\r\n   │  │  ├─ glrd.png\r\n   │  │  ├─ glru.png\r\n   │  │  ├─ glrud.png\r\n   │  │  ├─ glu.png\r\n   │  │  ├─ gr.png\r\n   │  │  ├─ grd.png\r\n   │  │  ├─ gru.png\r\n   │  │  ├─ gu.png\r\n   │  │  ├─ l.png\r\n   │  │  ├─ ld.png\r\n   │  │  ├─ r.png\r\n   │  │  └─ rd.png\r\n   │  ├─ blood\r\n   │  │  ├─ 0.png\r\n   │  │  ├─ 10.png\r\n   │  │  ├─ 100.png\r\n   │  │  ├─ 12.png\r\n   │  │  ├─ 14.png\r\n   │  │  ├─ 16.png\r\n   │  │  ├─ 18.png\r\n   │  │  ├─ 2.png\r\n   │  │  ├─ 20.png\r\n   │  │  ├─ 22.png\r\n   │  │  ├─ 24.png\r\n   │  │  ├─ 26.png\r\n   │  │  ├─ 28.png\r\n   │  │  ├─ 30.png\r\n   │  │  ├─ 32.png\r\n   │  │  ├─ 34.png\r\n   │  │  ├─ 36.png\r\n   │  │  ├─ 38.png\r\n   │  │  ├─ 4.png\r\n   │  │  ├─ 40.png\r\n   │  │  ├─ 42.png\r\n   │  │  ├─ 44.png\r\n   │  │  ├─ 46.png\r\n   │  │  ├─ 48.png\r\n   │  │  ├─ 50.png\r\n   │  │  ├─ 52.png\r\n   │  │  ├─ 54.png\r\n   │  │  ├─ 56.png\r\n   │  │  ├─ 58.png\r\n   │  │  ├─ 6.png\r\n   │  │  ├─ 60.png\r\n   │  │  ├─ 62.png\r\n   │  │  ├─ 64.png\r\n   │  │  ├─ 66.png\r\n   │  │  ├─ 68.png\r\n   │  │  ├─ 70.png\r\n   │  │  ├─ 72.png\r\n   │  │  ├─ 74.png\r\n   │  │  ├─ 76.png\r\n   │  │  ├─ 78.png\r\n   │  │  ├─ 8.png\r\n   │  │  ├─ 80.png\r\n   │  │  ├─ 82.png\r\n   │  │  ├─ 84.png\r\n   │  │  ├─ 86.png\r\n   │  │  ├─ 88.png\r\n   │  │  ├─ 90.png\r\n   │  │  ├─ 92.png\r\n   │  │  ├─ 94.png\r\n   │  │  ├─ 96.png\r\n   │  │  └─ 98.png\r\n   │  ├─ buff\r\n   │  │  ├─ bingdong.png\r\n   │  │  ├─ fangxie.png\r\n   │  │  ├─ fusheng.png\r\n   │  │  ├─ huoli.png\r\n   │  │  ├─ jiangu.png\r\n   │  │  ├─ jisu.png\r\n   │  │  ├─ jiyun.png\r\n   │  │  ├─ kuaigong.png\r\n   │  │  ├─ kuangbao.png\r\n   │  │  ├─ liliang.png\r\n   │  │  ├─ qungong.png\r\n   │  │  ├─ tudu.png\r\n   │  │  ├─ wangyu.png\r\n   │  │  ├─ yingyan.png\r\n   │  │  └─ yinni.png\r\n   │  ├─ Grass Tileset.png\r\n   │  ├─ icon\r\n   │  │  └─ gem.png\r\n   │  ├─ monster\r\n   │  │  ├─ archer-fliped.gif\r\n   │  │  ├─ archer.gif\r\n   │  │  ├─ archerattk.gif\r\n   │  │  ├─ archerattkf.gif\r\n   │  │  ├─ bat-x4-fliped.gif\r\n   │  │  ├─ bat-x4.gif\r\n   │  │  ├─ frog-x4-fliped.gif\r\n   │  │  ├─ frog-x4.gif\r\n   │  │  ├─ ghost-x4-fliped.gif\r\n   │  │  ├─ ghost-x4.gif\r\n   │  │  ├─ skeleton-x4-fliped.gif\r\n   │  │  └─ skeleton-x4.gif\r\n   │  ├─ spirit\r\n   │  │  ├─ Attack.gif\r\n   │  │  ├─ Attackf.gif\r\n   │  │  ├─ Idle.gif\r\n   │  │  └─ Idlef.gif\r\n   │  ├─ tower\r\n   │  │  └─ BloodMoonTower.gif\r\n   │  └─ vfx\r\n   ├─ resource.qrc\r\n   ├─ startmenu.cpp\r\n   ├─ startmenu.h\r\n   └─ startmenu.ui\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnewbeeyhy%2Fmygame","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnewbeeyhy%2Fmygame","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnewbeeyhy%2Fmygame/lists"}