RTS/Archetypes (WIP):

- equipment for new factions
- game gets a calendar
This commit is contained in:
Enno Rehling 2007-05-28 17:52:24 +00:00
parent 0711b51cfe
commit 2651973059
5 changed files with 37 additions and 9 deletions

View File

@ -1114,12 +1114,12 @@ recruit_archetype(unit * u, order * ord)
} else switch(n) { } else switch(n) {
case ENOMATERIALS: case ENOMATERIALS:
ADDMSG(&u->faction->msgs, msg_materials_required(u, ord, arch->ctype)); ADDMSG(&u->faction->msgs, msg_materials_required(u, ord, arch->ctype));
return 0; break;
case ELOWSKILL: case ELOWSKILL:
case ENEEDSKILL: case ENEEDSKILL:
/* no skill, or not enough skill points to build */ /* no skill, or not enough skill points to build */
cmistake(u, ord, 50, MSG_PRODUCE); cmistake(u, ord, 50, MSG_PRODUCE);
return 0; break;
default: default:
assert(!"unhandled return value from build() in recruit_archetype"); assert(!"unhandled return value from build() in recruit_archetype");
} }

View File

@ -13,8 +13,9 @@
<xi:include href="ships.xml"/> <xi:include href="ships.xml"/>
<xi:include href="rts/buildings.xml"/> <xi:include href="rts/buildings.xml"/>
<xi:include href="rts/units.xml"/> <xi:include href="rts/units.xml"/>
<xi:include href="eressea/calendar.xml"/> <xi:include href="rts/calendar.xml"/>
<xi:include href="equipment.xml"/> <xi:include href="equipment.xml"/>
<xi:include href="rts/equipment.xml"/>
<xi:include href="spells.xml"/> <xi:include href="spells.xml"/>
<xi:include href="terrains.xml"/> <xi:include href="terrains.xml"/>
<xi:include href="dungeons.xml"/> <xi:include href="dungeons.xml"/>

23
src/res/rts/calendar.xml Normal file
View File

@ -0,0 +1,23 @@
<?xml version="1.0"?>
<calendar name="secondage" newyear="month_1" start="1">
<season name="winter">
<month name="month_4" storm="50" />
<month name="month_5" storm="30" />
<month name="month_6" storm="60" />
</season>
<season name="spring">
<month name="month_7" storm="60" />
<month name="month_8" storm="10" />
</season>
<season name="summer">
<month name="month_9" storm="60" />
<month name="month_1" storm="10" />
</season>
<season name="fall">
<month name="month_2" storm="60" />
<month name="month_3" storm="80" />
</season>
<week name="firstweek" />
<week name="secondweek" />
<week name="thirdweek" />
</calendar>

View File

@ -20,7 +20,16 @@
</set> </set>
<set name="craftsman"> <set name="craftsman">
<skill name="building" level="1"/> <skill name="building" level="2"/>
</set>
<set name="new_faction">
<subset>
<set name="craftsman"/>
</subset>
<item name="money" amount="4200"/>
<item name="log" amount="30"/>
<item name="stone" amount="30"/>
</set> </set>
</equipment> </equipment>

View File

@ -34,11 +34,6 @@ function run_scripts()
end end
function process(orders) function process(orders)
-- initialize starting equipment for new players
equipment_setitem("new_faction", "log", "30");
equipment_setitem("new_faction", "stone", "30");
equipment_setitem("new_faction", "money", "4200");
file = "" .. get_turn() file = "" .. get_turn()
if read_game(file)~=0 then if read_game(file)~=0 then
print("could not read game") print("could not read game")