diff --git a/missions/custom/techdemo/cyberdogs.cdogscpn/campaign.json b/missions/custom/techdemo/cyberdogs.cdogscpn/campaign.json index 88958eca4..a4c59d448 100644 --- a/missions/custom/techdemo/cyberdogs.cdogscpn/campaign.json +++ b/missions/custom/techdemo/cyberdogs.cdogscpn/campaign.json @@ -12,5 +12,5 @@ "MaxLives": 4, "PlayerHP": 20, "PlayerMaxHP": 50, - "Missions": 5 + "Missions": 10 } \ No newline at end of file diff --git a/missions/custom/techdemo/cyberdogs.cdogscpn/missions.json b/missions/custom/techdemo/cyberdogs.cdogscpn/missions.json index b39808455..1bf14ebb0 100644 --- a/missions/custom/techdemo/cyberdogs.cdogscpn/missions.json +++ b/missions/custom/techdemo/cyberdogs.cdogscpn/missions.json @@ -29,14 +29,6 @@ "Count": 400, "Required": 0, "Flags": 1 - }, - { - "Description": "Destroy", - "Type": "Destroy", - "MapObjects": ["reactor"], - "Count": 1, - "Required": 1, - "Flags": 0 }], "Enemies": [3], "SpecialChars": [], @@ -177,7 +169,7 @@ "ExitStyle": "hazard", "KeyStyle": "office", "Objectives": [{ - "Description": "", + "Description": "Retrieve objects", "Type": "Collect", "Pickups": ["folder", "disk1", @@ -187,6 +179,17 @@ "Count": 16, "Required": 8, "Flags": 0 + }, + { + "Description": "Demolition", + "Type": "Destroy", + "MapObjects": ["crate", + "box", + "box3_gray", + "cabinet_server"], + "Count": 400, + "Required": 0, + "Flags": 1 }], "Enemies": [0], "SpecialChars": [], @@ -343,7 +346,7 @@ "ExitStyle": "hazard", "KeyStyle": "office", "Objectives": [{ - "Description": "", + "Description": "Retrieve objects", "Type": "Collect", "Pickups": ["folder", "disk1", @@ -353,6 +356,17 @@ "Count": 20, "Required": 10, "Flags": 0 + }, + { + "Description": "Demolition", + "Type": "Destroy", + "MapObjects": ["crate", + "box", + "box3_gray", + "cabinet_server"], + "Count": 400, + "Required": 0, + "Flags": 1 }], "Enemies": [0], "SpecialChars": [], @@ -509,7 +523,7 @@ "ExitStyle": "hazard", "KeyStyle": "office", "Objectives": [{ - "Description": "", + "Description": "Retrieve objects", "Type": "Collect", "Pickups": ["folder", "disk1", @@ -519,6 +533,17 @@ "Count": 24, "Required": 12, "Flags": 0 + }, + { + "Description": "Demolition", + "Type": "Destroy", + "MapObjects": ["crate", + "box", + "box3_gray", + "cabinet_server"], + "Count": 400, + "Required": 0, + "Flags": 1 }], "Enemies": [0], "SpecialChars": [], @@ -675,12 +700,936 @@ "ExitStyle": "hazard", "KeyStyle": "office", "Objectives": [{ - "Description": "", + "Description": "Kill enemies", "Type": "Kill", "Index": 0, "Count": 90, "Required": 70, "Flags": 0 + }, + { + "Description": "Destroy the reactor", + "Type": "Destroy", + "MapObjects": ["reactor"], + "Count": 1, + "Required": 1, + "Flags": 0 + }, + { + "Description": "Demolition", + "Type": "Destroy", + "MapObjects": ["crate", + "box", + "box3_gray", + "cabinet_server"], + "Count": 400, + "Required": 0, + "Flags": 1 + }], + "Enemies": [0], + "SpecialChars": [], + "MapObjectDensities": [{ + "MapObject": "crate", + "Density": 20 + }, + { + "MapObject": "box", + "Density": 20 + }, + { + "MapObject": "fan", + "Density": 10 + }, + { + "MapObject": "cabinet_server", + "Density": 20 + }, + { + "MapObject": "box3_gray", + "Density": 20 + }, + { + "MapObject": "blood0", + "Density": 10 + }, + { + "MapObject": "blood1", + "Density": 10 + }, + { + "MapObject": "blood2", + "Density": 10 + }, + { + "MapObject": "bulletmarks", + "Density": 50 + }, + { + "MapObject": "skull", + "Density": 10 + }, + { + "MapObject": "rocket_wreck", + "Density": 10 + }, + { + "MapObject": "bloodstain", + "Density": 20 + }, + { + "MapObject": "bloodstain1", + "Density": 20 + }], + "EnemyDensity": 13, + "Weapons": ["Fists", + "Chainsaw", + "2xChainsaw", + "3xChainsaw", + "4xChainsaw", + "5xChainsaw", + "MiniGun", + "Launcher", + "Flamer", + "Powergun", + "Blaster", + "MegaGun"], + "WeaponPersist": true, + "SkipDebrief": false, + "TileClasses": { + "Wall": { + "Name": "wall", + "Type": "Wall", + "Style": "brick", + "Mask": "303030ff", + "MaskAlt": "008400ff", + "CanWalk": false, + "IsOpaque": true, + "Shootable": true, + "IsRoom": false, + "DamageBullet": "" + }, + "Floor": { + "Name": "tile", + "Type": "Floor", + "Style": "dirt", + "Mask": "584418ff", + "MaskAlt": "008400ff", + "CanWalk": true, + "IsOpaque": false, + "Shootable": false, + "IsRoom": false, + "DamageBullet": "" + }, + "Room": { + "Name": "tile", + "Type": "Floor", + "Style": "dirt", + "Mask": "584418ff", + "MaskAlt": "008400ff", + "CanWalk": true, + "IsOpaque": false, + "Shootable": false, + "IsRoom": true, + "DamageBullet": "" + }, + "Door": { + "Name": "door", + "Type": "Door", + "Style": "office", + "Mask": "ffffffff", + "MaskAlt": "ffffffff", + "CanWalk": false, + "IsOpaque": true, + "Shootable": true, + "IsRoom": true, + "DamageBullet": "" + } + }, + "Walls": 140, + "WallLength": 20, + "CorridorWidth": 2, + "Rooms": { + "Count": 30, + "Min": 7, + "Max": 10, + "Edge": false, + "Overlap": false, + "Walls": 0, + "WallLength": 1, + "WallPad": 1 + }, + "Squares": 1, + "ExitEnabled": true, + "Doors": { + "Enabled": false, + "Min": 2, + "Max": 2, + "RandomPos": false + }, + "Pillars": { + "Count": 0, + "Min": 2, + "Max": 3 + } + }, + { + "Title": "Mission 6", + "Description": "", + "Type": "Classic", + "Width": 100, + "Height": 100, + "ExitStyle": "hazard", + "KeyStyle": "office", + "Objectives": [{ + "Description": "Retrieve objects", + "Type": "Collect", + "Pickups": ["folder", + "disk1", + "pci_card", + "paper", + "teddy"], + "Count": 12, + "Required": 8, + "Flags": 0 + }, + { + "Description": "Kill enemies", + "Type": "Kill", + "Index": 0, + "Count": 100, + "Required": 40, + "Flags": 0 + }, + { + "Description": "Demolition", + "Type": "Destroy", + "MapObjects": ["crate", + "box", + "box3_gray", + "cabinet_server"], + "Count": 400, + "Required": 0, + "Flags": 1 + }], + "Enemies": [0], + "SpecialChars": [], + "MapObjectDensities": [{ + "MapObject": "crate", + "Density": 20 + }, + { + "MapObject": "box", + "Density": 20 + }, + { + "MapObject": "fan", + "Density": 10 + }, + { + "MapObject": "cabinet_server", + "Density": 20 + }, + { + "MapObject": "box3_gray", + "Density": 20 + }, + { + "MapObject": "blood0", + "Density": 10 + }, + { + "MapObject": "blood1", + "Density": 10 + }, + { + "MapObject": "blood2", + "Density": 10 + }, + { + "MapObject": "bulletmarks", + "Density": 50 + }, + { + "MapObject": "skull", + "Density": 10 + }, + { + "MapObject": "rocket_wreck", + "Density": 10 + }, + { + "MapObject": "bloodstain", + "Density": 20 + }, + { + "MapObject": "bloodstain1", + "Density": 20 + }], + "EnemyDensity": 13, + "Weapons": ["Fists", + "Chainsaw", + "2xChainsaw", + "3xChainsaw", + "4xChainsaw", + "5xChainsaw", + "MiniGun", + "Launcher", + "Flamer", + "Powergun", + "Blaster", + "MegaGun"], + "WeaponPersist": true, + "SkipDebrief": false, + "TileClasses": { + "Wall": { + "Name": "wall", + "Type": "Wall", + "Style": "brick", + "Mask": "303030ff", + "MaskAlt": "008400ff", + "CanWalk": false, + "IsOpaque": true, + "Shootable": true, + "IsRoom": false, + "DamageBullet": "" + }, + "Floor": { + "Name": "tile", + "Type": "Floor", + "Style": "dirt", + "Mask": "584418ff", + "MaskAlt": "008400ff", + "CanWalk": true, + "IsOpaque": false, + "Shootable": false, + "IsRoom": false, + "DamageBullet": "" + }, + "Room": { + "Name": "tile", + "Type": "Floor", + "Style": "dirt", + "Mask": "584418ff", + "MaskAlt": "008400ff", + "CanWalk": true, + "IsOpaque": false, + "Shootable": false, + "IsRoom": true, + "DamageBullet": "" + }, + "Door": { + "Name": "door", + "Type": "Door", + "Style": "office", + "Mask": "ffffffff", + "MaskAlt": "ffffffff", + "CanWalk": false, + "IsOpaque": true, + "Shootable": true, + "IsRoom": true, + "DamageBullet": "" + } + }, + "Walls": 140, + "WallLength": 20, + "CorridorWidth": 2, + "Rooms": { + "Count": 30, + "Min": 7, + "Max": 10, + "Edge": false, + "Overlap": false, + "Walls": 0, + "WallLength": 1, + "WallPad": 1 + }, + "Squares": 1, + "ExitEnabled": true, + "Doors": { + "Enabled": false, + "Min": 2, + "Max": 2, + "RandomPos": false + }, + "Pillars": { + "Count": 0, + "Min": 2, + "Max": 3 + } + }, + { + "Title": "Mission 7", + "Description": "", + "Type": "Classic", + "Width": 100, + "Height": 100, + "ExitStyle": "hazard", + "KeyStyle": "office", + "Objectives": [{ + "Description": "Retrieve objects", + "Type": "Collect", + "Pickups": ["folder", + "disk1", + "pci_card", + "paper", + "teddy"], + "Count": 24, + "Required": 18, + "Flags": 0 + }, + { + "Description": "Destroy reactors", + "Type": "Destroy", + "MapObjects": ["reactor"], + "Count": 2, + "Required": 2, + "Flags": 0 + }, + { + "Description": "Demolition", + "Type": "Destroy", + "MapObjects": ["crate", + "box", + "box3_gray", + "cabinet_server"], + "Count": 400, + "Required": 0, + "Flags": 1 + }], + "Enemies": [0], + "SpecialChars": [], + "MapObjectDensities": [{ + "MapObject": "crate", + "Density": 20 + }, + { + "MapObject": "box", + "Density": 20 + }, + { + "MapObject": "fan", + "Density": 10 + }, + { + "MapObject": "cabinet_server", + "Density": 20 + }, + { + "MapObject": "box3_gray", + "Density": 20 + }, + { + "MapObject": "blood0", + "Density": 10 + }, + { + "MapObject": "blood1", + "Density": 10 + }, + { + "MapObject": "blood2", + "Density": 10 + }, + { + "MapObject": "bulletmarks", + "Density": 50 + }, + { + "MapObject": "skull", + "Density": 10 + }, + { + "MapObject": "rocket_wreck", + "Density": 10 + }, + { + "MapObject": "bloodstain", + "Density": 20 + }, + { + "MapObject": "bloodstain1", + "Density": 20 + }], + "EnemyDensity": 13, + "Weapons": ["Fists", + "Chainsaw", + "2xChainsaw", + "3xChainsaw", + "4xChainsaw", + "5xChainsaw", + "MiniGun", + "Launcher", + "Flamer", + "Powergun", + "Blaster", + "MegaGun"], + "WeaponPersist": true, + "SkipDebrief": false, + "TileClasses": { + "Wall": { + "Name": "wall", + "Type": "Wall", + "Style": "brick", + "Mask": "303030ff", + "MaskAlt": "008400ff", + "CanWalk": false, + "IsOpaque": true, + "Shootable": true, + "IsRoom": false, + "DamageBullet": "" + }, + "Floor": { + "Name": "tile", + "Type": "Floor", + "Style": "dirt", + "Mask": "584418ff", + "MaskAlt": "008400ff", + "CanWalk": true, + "IsOpaque": false, + "Shootable": false, + "IsRoom": false, + "DamageBullet": "" + }, + "Room": { + "Name": "tile", + "Type": "Floor", + "Style": "dirt", + "Mask": "584418ff", + "MaskAlt": "008400ff", + "CanWalk": true, + "IsOpaque": false, + "Shootable": false, + "IsRoom": true, + "DamageBullet": "" + }, + "Door": { + "Name": "door", + "Type": "Door", + "Style": "office", + "Mask": "ffffffff", + "MaskAlt": "ffffffff", + "CanWalk": false, + "IsOpaque": true, + "Shootable": true, + "IsRoom": true, + "DamageBullet": "" + } + }, + "Walls": 140, + "WallLength": 20, + "CorridorWidth": 2, + "Rooms": { + "Count": 30, + "Min": 7, + "Max": 10, + "Edge": false, + "Overlap": false, + "Walls": 0, + "WallLength": 1, + "WallPad": 1 + }, + "Squares": 1, + "ExitEnabled": true, + "Doors": { + "Enabled": false, + "Min": 2, + "Max": 2, + "RandomPos": false + }, + "Pillars": { + "Count": 0, + "Min": 2, + "Max": 3 + } + }, + { + "Title": "Mission 8", + "Description": "", + "Type": "Classic", + "Width": 100, + "Height": 100, + "ExitStyle": "hazard", + "KeyStyle": "office", + "Objectives": [{ + "Description": "Kill enemies", + "Type": "Kill", + "Index": 0, + "Count": 140, + "Required": 100, + "Flags": 0 + }, + { + "Description": "Destroy reactors", + "Type": "Destroy", + "MapObjects": ["reactor"], + "Count": 2, + "Required": 2, + "Flags": 0 + }, + { + "Description": "Demolition", + "Type": "Destroy", + "MapObjects": ["crate", + "box", + "box3_gray", + "cabinet_server"], + "Count": 400, + "Required": 0, + "Flags": 1 + }], + "Enemies": [0], + "SpecialChars": [], + "MapObjectDensities": [{ + "MapObject": "crate", + "Density": 20 + }, + { + "MapObject": "box", + "Density": 20 + }, + { + "MapObject": "fan", + "Density": 10 + }, + { + "MapObject": "cabinet_server", + "Density": 20 + }, + { + "MapObject": "box3_gray", + "Density": 20 + }, + { + "MapObject": "blood0", + "Density": 10 + }, + { + "MapObject": "blood1", + "Density": 10 + }, + { + "MapObject": "blood2", + "Density": 10 + }, + { + "MapObject": "bulletmarks", + "Density": 50 + }, + { + "MapObject": "skull", + "Density": 10 + }, + { + "MapObject": "rocket_wreck", + "Density": 10 + }, + { + "MapObject": "bloodstain", + "Density": 20 + }, + { + "MapObject": "bloodstain1", + "Density": 20 + }], + "EnemyDensity": 13, + "Weapons": ["Fists", + "Chainsaw", + "2xChainsaw", + "3xChainsaw", + "4xChainsaw", + "5xChainsaw", + "MiniGun", + "Launcher", + "Flamer", + "Powergun", + "Blaster", + "MegaGun"], + "WeaponPersist": true, + "SkipDebrief": false, + "TileClasses": { + "Wall": { + "Name": "wall", + "Type": "Wall", + "Style": "brick", + "Mask": "303030ff", + "MaskAlt": "008400ff", + "CanWalk": false, + "IsOpaque": true, + "Shootable": true, + "IsRoom": false, + "DamageBullet": "" + }, + "Floor": { + "Name": "tile", + "Type": "Floor", + "Style": "dirt", + "Mask": "584418ff", + "MaskAlt": "008400ff", + "CanWalk": true, + "IsOpaque": false, + "Shootable": false, + "IsRoom": false, + "DamageBullet": "" + }, + "Room": { + "Name": "tile", + "Type": "Floor", + "Style": "dirt", + "Mask": "584418ff", + "MaskAlt": "008400ff", + "CanWalk": true, + "IsOpaque": false, + "Shootable": false, + "IsRoom": true, + "DamageBullet": "" + }, + "Door": { + "Name": "door", + "Type": "Door", + "Style": "office", + "Mask": "ffffffff", + "MaskAlt": "ffffffff", + "CanWalk": false, + "IsOpaque": true, + "Shootable": true, + "IsRoom": true, + "DamageBullet": "" + } + }, + "Walls": 140, + "WallLength": 20, + "CorridorWidth": 2, + "Rooms": { + "Count": 30, + "Min": 7, + "Max": 10, + "Edge": false, + "Overlap": false, + "Walls": 0, + "WallLength": 1, + "WallPad": 1 + }, + "Squares": 1, + "ExitEnabled": true, + "Doors": { + "Enabled": false, + "Min": 2, + "Max": 2, + "RandomPos": false + }, + "Pillars": { + "Count": 0, + "Min": 2, + "Max": 3 + } + }, + { + "Title": "Mission 9", + "Description": "", + "Type": "Classic", + "Width": 100, + "Height": 100, + "ExitStyle": "hazard", + "KeyStyle": "office", + "Objectives": [{ + "Description": "Retrieve objects", + "Type": "Collect", + "Pickups": ["folder", + "disk1", + "pci_card", + "paper", + "teddy"], + "Count": 28, + "Required": 22, + "Flags": 0 + }, + { + "Description": "Demolition", + "Type": "Destroy", + "MapObjects": ["crate", + "box", + "box3_gray", + "cabinet_server"], + "Count": 400, + "Required": 0, + "Flags": 1 + }], + "Enemies": [0], + "SpecialChars": [], + "MapObjectDensities": [{ + "MapObject": "crate", + "Density": 20 + }, + { + "MapObject": "box", + "Density": 20 + }, + { + "MapObject": "fan", + "Density": 10 + }, + { + "MapObject": "cabinet_server", + "Density": 20 + }, + { + "MapObject": "box3_gray", + "Density": 20 + }, + { + "MapObject": "blood0", + "Density": 10 + }, + { + "MapObject": "blood1", + "Density": 10 + }, + { + "MapObject": "blood2", + "Density": 10 + }, + { + "MapObject": "bulletmarks", + "Density": 50 + }, + { + "MapObject": "skull", + "Density": 10 + }, + { + "MapObject": "rocket_wreck", + "Density": 10 + }, + { + "MapObject": "bloodstain", + "Density": 20 + }, + { + "MapObject": "bloodstain1", + "Density": 20 + }], + "EnemyDensity": 13, + "Weapons": ["Fists", + "Chainsaw", + "2xChainsaw", + "3xChainsaw", + "4xChainsaw", + "5xChainsaw", + "MiniGun", + "Launcher", + "Flamer", + "Powergun", + "Blaster", + "MegaGun"], + "WeaponPersist": true, + "SkipDebrief": false, + "TileClasses": { + "Wall": { + "Name": "wall", + "Type": "Wall", + "Style": "brick", + "Mask": "303030ff", + "MaskAlt": "008400ff", + "CanWalk": false, + "IsOpaque": true, + "Shootable": true, + "IsRoom": false, + "DamageBullet": "" + }, + "Floor": { + "Name": "tile", + "Type": "Floor", + "Style": "dirt", + "Mask": "584418ff", + "MaskAlt": "008400ff", + "CanWalk": true, + "IsOpaque": false, + "Shootable": false, + "IsRoom": false, + "DamageBullet": "" + }, + "Room": { + "Name": "tile", + "Type": "Floor", + "Style": "dirt", + "Mask": "584418ff", + "MaskAlt": "008400ff", + "CanWalk": true, + "IsOpaque": false, + "Shootable": false, + "IsRoom": true, + "DamageBullet": "" + }, + "Door": { + "Name": "door", + "Type": "Door", + "Style": "office", + "Mask": "ffffffff", + "MaskAlt": "ffffffff", + "CanWalk": false, + "IsOpaque": true, + "Shootable": true, + "IsRoom": true, + "DamageBullet": "" + } + }, + "Walls": 140, + "WallLength": 20, + "CorridorWidth": 2, + "Rooms": { + "Count": 30, + "Min": 7, + "Max": 10, + "Edge": false, + "Overlap": false, + "Walls": 0, + "WallLength": 1, + "WallPad": 1 + }, + "Squares": 1, + "ExitEnabled": true, + "Doors": { + "Enabled": false, + "Min": 2, + "Max": 2, + "RandomPos": false + }, + "Pillars": { + "Count": 0, + "Min": 2, + "Max": 3 + } + }, + { + "Title": "Mission 10", + "Description": "", + "Type": "Classic", + "Width": 100, + "Height": 100, + "ExitStyle": "hazard", + "KeyStyle": "office", + "Objectives": [{ + "Description": "Retrieve objects", + "Type": "Collect", + "Pickups": ["folder", + "disk1", + "pci_card", + "paper", + "teddy"], + "Count": 30, + "Required": 24, + "Flags": 0 + }, + { + "Description": "Demolition", + "Type": "Destroy", + "MapObjects": ["crate", + "box", + "box3_gray", + "cabinet_server"], + "Count": 400, + "Required": 0, + "Flags": 1 }], "Enemies": [0], "SpecialChars": [], diff --git a/src/cdogs/mission.c b/src/cdogs/mission.c index 3736561d0..7623357c0 100644 --- a/src/cdogs/mission.c +++ b/src/cdogs/mission.c @@ -22,7 +22,7 @@ This file incorporates work covered by the following copyright and permission notice: - Copyright (c) 2013-2017, 2019-2022 Cong Xu + Copyright (c) 2013-2017, 2019-2023 Cong Xu All rights reserved. Redistribution and use in source and binary forms, with or without @@ -218,6 +218,9 @@ void MissionCopy(Mission *dst, const Mission *src) CASSERT(false, "unsupported music type"); break; } + + dst->WeaponPersist = src->WeaponPersist; + dst->SkipDebrief = src->SkipDebrief; memcpy(&dst->u, &src->u, sizeof dst->u); switch (src->Type) diff --git a/src/cdogsed/cdogsed.c b/src/cdogsed/cdogsed.c index 01a4bc1f8..a6f1a3dc4 100644 --- a/src/cdogsed/cdogsed.c +++ b/src/cdogsed/cdogsed.c @@ -800,6 +800,7 @@ static HandleInputResult HandleInput( case 'c': MissionTerminate(scrap); MissionCopy(scrap, mission); + SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_INFORMATION, "Editor", "Mission copied", gGraphicsDevice.gameWindow.window); break; case 'v':