Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cpp-project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Maul
cpp-project
Commits
15684454
Commit
15684454
authored
5 months ago
by
Lorenz Martin Diel
Browse files
Options
Downloads
Patches
Plain Diff
XMLs erstellt
parent
3f871b72
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
XML/unitXML.txt
+196
-0
196 additions, 0 deletions
XML/unitXML.txt
XML/unitXML_test.txt
+73
-0
73 additions, 0 deletions
XML/unitXML_test.txt
src/unit.hpp
+2
-2
2 additions, 2 deletions
src/unit.hpp
with
271 additions
and
2 deletions
XML/unitXML.txt
0 → 100644
+
196
−
0
View file @
15684454
<?xml version="1.0" encoding="UTF-8"?>
<Units>
<Unit id="1" type="Infantry">
<Description>Basic ground unit, useful for capturing properties.</Description>
<Cost>1000</Cost>
<minRange>1</minRange>
<maxRange>1</maxRange>
<MovementType>Infantry</MovementType>
<MovementPoints>3</MovementPoints>
<Weapons>
<PrimaryWeapon>Machine Gun</PrimaryWeapon>
<SecondaryWeapon>None</SecondaryWeapon>
</Weapons>
</Unit>
<Unit id="2" type="Mech">
<Description>Advanced infantry unit, equipped with rockets for anti-vehicle combat.</Description>
<Cost>3000</Cost>
<minRange>1</minRange>
<maxRange>1</maxRange>
<MovementType>Infantry</MovementType>
<MovementPoints>2</MovementPoints>
<Weapons>
<PrimaryWeapon>Rockets</PrimaryWeapon>
<SecondaryWeapon>Machine Gun</SecondaryWeapon>
</Weapons>
</Unit>
<Unit id="3" type="Tank">
<Description>Basic vehicle unit, effective against infantry and light vehicles.</Description>
<Cost>7000</Cost>
<minRange>1</minRange>
<maxRange>1</maxRange>
<MovementType>Tread</MovementType>
<MovementPoints>6</MovementPoints>
<Weapons>
<PrimaryWeapon>Bazooka</PrimaryWeapon>
<SecondaryWeapon>Machine Gun</SecondaryWeapon>
</Weapons>
</Unit>
<Unit id="4" type="Medium Tank">
<Description>Heavily armored tank, excellent against most ground units.</Description>
<Cost>16000</Cost>
<minRange>1</minRange>
<maxRange>1</maxRange>
<MovementType>Tread</MovementType>
<MovementPoints>5</MovementPoints>
<Weapons>
<PrimaryWeapon>Cannon</PrimaryWeapon>
<SecondaryWeapon>Machine Gun</SecondaryWeapon>
</Weapons>
</Unit>
<Unit id="5" type="Neo Tank">
<Description>Cutting-edge tank with superior firepower and speed.</Description>
<Cost>22000</Cost>
<minRange>1</minRange>
<maxRange>1</maxRange>
<MovementType>Tread</MovementType>
<MovementPoints>6</MovementPoints>
<Weapons>
<PrimaryWeapon>Cannon</PrimaryWeapon>
<SecondaryWeapon>Machine Gun</SecondaryWeapon>
</Weapons>
</Unit>
<Unit id="6" type="Megatank">
<Description>The strongest tank on Earth. But Movement is low.</Description>
<Cost>28000</Cost>
<minRange>1</minRange>
<maxRange>1</maxRange>
<MovementType>Tread</MovementType>
<MovementPoints>4</MovementPoints>
<Weapons>
<PrimaryWeapon>Cannon</PrimaryWeapon>
<SecondaryWeapon>Machine Gun</SecondaryWeapon>
</Weapons>
</Unit>
<Unit id="7" type="Artillery">
<Description>Indirect fire unit with long-range attack capabilities.</Description>
<Cost>6000</Cost>
<minRange>2</minRange>
<maxRange>3</maxRange>
<MovementType>Tread</MovementType>
<MovementPoints>5</MovementPoints>
<Weapons>
<PrimaryWeapon>Howitzer</PrimaryWeapon>
<SecondaryWeapon>None</SecondaryWeapon>
</Weapons>
</Unit>
<Unit id="8" type="Rocket">
<Description>Long-range missile launcher, devastating against all ground units.</Description>
<Cost>15000</Cost>
<minRange>3</minRange>
<maxRange>5</maxRange>
<MovementType>Tires</MovementType>
<MovementPoints>5</MovementPoints>
<Weapons>
<PrimaryWeapon>Missile Launcher</PrimaryWeapon>
<SecondaryWeapon>None</SecondaryWeapon>
</Weapons>
</Unit>
<Unit id="9" type="Missiles">
<Description>Missile units are essential in defending against air units.</Description>
<Cost>12000</Cost>
<minRange>3</minRange>
<maxRange>5</maxRange>
<MovementType>Tires</MovementType>
<MovementPoints>5</MovementPoints>
<Weapons>
<PrimaryWeapon>Missiles</PrimaryWeapon>
<SecondaryWeapon>None</SecondaryWeapon>
</Weapons>
</Unit>
<Unit id="10" type="Anti-Air">
<Description>Highly effective against air units and infantry.</Description>
<Cost>8000</Cost>
<minRange>1</minRange>
<maxRange>1</maxRange>
<MovementType>Tires</MovementType>
<MovementPoints>6</MovementPoints>
<Weapons>
<PrimaryWeapon>Vulcan</PrimaryWeapon>
<SecondaryWeapon>None</SecondaryWeapon>
</Weapons>
</Unit>
<Unit id="12" type="Recon">
<Description>Recons have a high movement range and vision. Good against infantry.</Description>
<Cost>4000</Cost>
<minRange>1</minRange>
<maxRange>1</maxRange>
<MovementType>Tires</MovementType>
<MovementPoints>8</MovementPoints>
<Weapons>
<PrimaryWeapon>None</PrimaryWeapon>
<SecondaryWeapon>Machine Gun</SecondaryWeapon>
</Weapons>
</Unit>
<Unit id="13" type="Fighter">
<Description>Fighter units are strong vs. other air units. They also have the highest movement.</Description>
<Cost>20000</Cost>
<minRange>1</minRange>
<maxRange>1</maxRange>
<MovementType>Air</MovementType>
<MovementPoints>9</MovementPoints>
<Weapons>
<PrimaryWeapon>Missiles</PrimaryWeapon>
<SecondaryWeapon>None</SecondaryWeapon>
</Weapons>
</Unit>
<Unit id="14" type="Bomber">
<Description>Bomber units can fire on ground and naval units with a high destructive force.</Description>
<Cost>22000</Cost>
<minRange>1</minRange>
<maxRange>1</maxRange>
<MovementType>Air</MovementType>
<MovementPoints>7</MovementPoints>
<Weapons>
<PrimaryWeapon>Bombs</PrimaryWeapon>
<SecondaryWeapon>None</SecondaryWeapon>
</Weapons>
</Unit>
<Unit id="13" type="B Copter">
<Description>B (Battle) copter units can fire on many unit types, so they're quite valuable.</Description>
<Cost>9000</Cost>
<minRange>1</minRange>
<maxRange>1</maxRange>
<MovementType>Air</MovementType>
<MovementPoints>6</MovementPoints>
<Weapons>
<PrimaryWeapon>Missiles</PrimaryWeapon>
<SecondaryWeapon>Machine Gun</SecondaryWeapon>
</Weapons>
</Unit>
<Unit id="16" type="Battleship">
<Description>Battleships have a larger attack range than even rocket units.</Description>
<Cost>28000</Cost>
<minRange>2</minRange>
<maxRange>6</maxRange>
<MovementType>Ship-Engine</MovementType>
<MovementPoints>5</MovementPoints>
<Weapons>
<PrimaryWeapon>Cannon</PrimaryWeapon>
<SecondaryWeapon>None</SecondaryWeapon>
</Weapons>
</Unit>
<Unit id="17" type="Cruiser">
<Description>Strong against subs and air units. Can load and supply two copter units.</Description>
<Cost>18000</Cost>
<minRange>1</minRange>
<maxRange>1</maxRange>
<MovementType>Ship-Engine</MovementType>
<MovementPoints>6</MovementPoints>
<Weapons>
<PrimaryWeapon>Missiles</PrimaryWeapon>
<SecondaryWeapon>Anti-Air Gun</SecondaryWeapon>
</Weapons>
</Unit>
</Units>
This diff is collapsed.
Click to expand it.
XML/unitXML_test.txt
0 → 100644
+
73
−
0
View file @
15684454
<?xml version="1.0" encoding="UTF-8"?>
<Units>
<Unit id="1" type="Infantry">
<Description>Basic ground unit, useful for capturing properties.</Description>
<Cost>1000</Cost>
<minRange>1</minRange>
<maxRange>1</maxRange>
<MovementType>Infantry</MovementType>
<MovementPoints>3</MovementPoints>
<Weapons>
<PrimaryWeapon>Machine Gun</PrimaryWeapon>
<SecondaryWeapon>None</SecondaryWeapon>
</Weapons>
<Attack>
<Infantry>55</Infantry>
<Mech>45</Mech>
<Tank>5</Tank>
</Attack>
</Unit>
<Unit id="2" type="Mech">
<Description>Advanced infantry unit, equipped with rockets for anti-vehicle combat.</Description>
<Cost>3000</Cost>
<minRange>1</minRange>
<maxRange>1</maxRange>
<MovementType>Infantry</MovementType>
<MovementPoints>2</MovementPoints>
<Weapons>
<PrimaryWeapon>Rockets</PrimaryWeapon>
<SecondaryWeapon>Machine Gun</SecondaryWeapon>
</Weapons>
<Attack>
<Infantry>65</Infantry>
<Mech>55</Mech>
<Tank>55</Tank>
</Attack>
</Unit>
<Unit id="3" type="Tank">
<Description>Basic vehicle unit, effective against infantry and light vehicles.</Description>
<Cost>7000</Cost>
<minRange>1</minRange>
<maxRange>1</maxRange>
<MovementType>Tread</MovementType>
<MovementPoints>6</MovementPoints>
<Weapons>
<PrimaryWeapon>Bazooka</PrimaryWeapon>
<SecondaryWeapon>Machine Gun</SecondaryWeapon>
</Weapons>
<Attack>
<Infantry>75</Infantry>
<Mech>70</Mech>
<Tank>55</Tank>
</Attack>
</Unit>
</Units>
<Buildings>
<Building id="1" type="City">
<Description>Basic infrastructure</Description>
<Profit>1000</Profit>
<Recruting-Types>
<None>
</Recruting-Types>
</Building>
<Building id="2" type="Factory">
<Description>Infrastructure for recruting Ground-Forces</Description>
<Profit>1000</Profit>
<Recruting-Types>
<Type>Infantry</Type>
<Type>Mech</Type>
<Type>Tank</Type>
</Recruting-Types>
</Building>
</Buildings>
This diff is collapsed.
Click to expand it.
src/unit.hpp
+
2
−
2
View file @
15684454
...
...
@@ -9,8 +9,8 @@
enum
class
MovementType
{
INFANTRY
,
T
RACKS
,
WHEELS
,
T
read
,
Tires
,
AIR
,
SHIPENIGNE
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment