236 lines
13 KiB
C
236 lines
13 KiB
C
#include "game.h"
|
|
|
|
#include <xolatile/chads.c>
|
|
|
|
void game_configure (void) {
|
|
define_trait ("Strength", 1, 1, 10);
|
|
define_trait ("Dexterity", 1, 1, 10);
|
|
define_trait ("Wisdom", 1, 1, 10);
|
|
|
|
define_skill ("Swords", 1, 1, 100);
|
|
define_skill ("Axes", 1, 1, 100);
|
|
define_skill ("Maces", 1, 1, 100);
|
|
define_skill ("Staves", 1, 1, 100);
|
|
define_skill ("Bows", 1, 1, 100);
|
|
define_skill ("Crossbows", 1, 1, 100);
|
|
define_skill ("Slings", 1, 1, 100);
|
|
define_skill ("Shields", 1, 1, 100);
|
|
define_skill ("Armour", 1, 1, 100);
|
|
define_skill ("Alchemy", 1, 1, 100);
|
|
define_skill ("Medicine", 1, 1, 100);
|
|
define_skill ("Mercantile", 1, 1, 100);
|
|
define_skill ("Farmer", 1, 1, 100);
|
|
define_skill ("Miner", 1, 1, 100);
|
|
define_skill ("Lumber", 1, 1, 100);
|
|
define_skill ("Traps", 1, 1, 100);
|
|
define_skill ("Water Magic", 1, 1, 100);
|
|
define_skill ("Earth Magic", 1, 1, 100);
|
|
define_skill ("Wind Magic", 1, 1, 100);
|
|
define_skill ("Black Magic", 1, 1, 100);
|
|
define_skill ("Rune Magic", 1, 1, 100);
|
|
define_skill ("Summon Magic", 1, 1, 100);
|
|
define_skill ("Ritual Magic", 1, 1, 100);
|
|
define_skill ("Charm Magic", 1, 1, 100);
|
|
|
|
define_value ("Coin", 1);
|
|
define_value ("Food", 2);
|
|
define_value ("Wood", 5);
|
|
define_value ("Stone", 7);
|
|
define_value ("Iron", 19);
|
|
define_value ("Silver", 23);
|
|
define_value ("Gold", 29);
|
|
define_value ("Coal", 13);
|
|
define_value ("Gems", 31);
|
|
define_value ("Mana", 37);
|
|
|
|
define_effect (entity_trait, target_self | target_increase, strength, 1);
|
|
define_effect (entity_trait, target_self | target_increase, strength, 3);
|
|
define_effect (entity_trait, target_self | target_increase, strength, 7);
|
|
|
|
define_might ("Might", gain_minor_strength);
|
|
|
|
define_magic ("Magic", 3, gain_major_strength);
|
|
|
|
define_race ("Orc", strength, axes, wood);
|
|
define_race ("Human", dexterity, medicine, iron);
|
|
define_race ("Elf", wisdom, rune_magic, gems);
|
|
|
|
define_item ("Iron Mace", 2, item_weapon, gain_minor_strength);
|
|
define_item ("Iron Sword", 3, item_weapon, gain_minor_strength);
|
|
define_item ("Iron Axe", 2, item_weapon, gain_minor_strength);
|
|
|
|
define_unit ("Gnoll", "Dirt-Hut", orc, unit_range, 1, 2, 7, -1);
|
|
define_unit ("Gnoll Shaman", "Treehouse", orc, unit_magic, 1, 3, 7, -1);
|
|
define_unit ("Goblin", "Dirty Shed", orc, unit_melee, 2, 3, 7, -1);
|
|
define_unit ("Hob-Goblin", "Old Barracks", orc, unit_melee | unit_magic, 3, 5, 7, -1);
|
|
define_unit ("Thief", "Thief Storehouse", orc, unit_melee, 3, 7, 5, -1);
|
|
define_unit ("Looter", "Abandoned Manor", orc, unit_range, 5, 7, 5, -1);
|
|
define_unit ("Warrior", "Longhouse", orc, unit_melee, 7, 11, 5, -1);
|
|
define_unit ("Shaman", "Cottage", orc, unit_magic, 7, 11, 3, -1);
|
|
define_unit ("Chief", "Campgrounds", orc, unit_melee | unit_range, 11, 13, 3, -1);
|
|
define_unit ("Wolf-Rider", "Wold Den", orc, unit_melee | unit_range, 17, 17, 2, -1);
|
|
define_unit ("Boar-Rider", "Boar Ranch", orc, unit_range, 19, 23, 2, -1);
|
|
define_unit ("Overlord", "Orcish Temple", orc, unit_melee | unit_magic, 23, 13, 2, -1);
|
|
define_unit ("Ogre", "Highlands", orc, unit_melee, 29, 23, 2, -1);
|
|
define_unit ("Ogre Mage", "Highland Tower", orc, unit_melee | unit_magic, 31, 29, 2, -1);
|
|
define_unit ("Troll", "Troll Den", orc, unit_melee, 37, 31, 1, -1);
|
|
define_unit ("War Troll", "Cavern-Fort", orc, unit_melee | unit_range, 41, 37, 1, -1);
|
|
define_unit ("Basilisk", "Dungeon", orc, unit_melee | unit_extra, 53, 59, 1, -1);
|
|
define_unit ("Wyvern", "Swamp Pit", orc, unit_melee | unit_extra, 59, 53, 1, -1);
|
|
define_unit ("Peasant", "Farm", human, unit_melee, 1, 1, 7, -1);
|
|
define_unit ("Scout", "Scout Shack", human, unit_range, 2, 3, 7, -1);
|
|
define_unit ("Hunter", "Archery", human, unit_range, 2, 3, 7, -1);
|
|
define_unit ("Swordman", "House of Slashing", human, unit_melee, 3, 5, 7, -1);
|
|
define_unit ("Axeman", "House of Cutting", human, unit_melee, 5, 5, 5, -1);
|
|
define_unit ("Crossbowman", "House of Shooting", human, unit_range, 5, 5, 5, -1);
|
|
define_unit ("Horseman", "Horse Ranch", human, unit_melee, 7, 11, 5, -1);
|
|
define_unit ("Guard", "Guard Barracks", human, unit_melee, 7, 7, 3, -1);
|
|
define_unit ("Elite Guard", "Guard Home", human, unit_melee, 13, 11, 3, -1);
|
|
define_unit ("Lancer", "Riding Meadow", human, unit_melee | unit_range, 17, 17, 2, -1);
|
|
define_unit ("Knight", "Mansion of Honour", human, unit_melee, 19, 23, 2, -1);
|
|
define_unit ("Kingsman", "King's Academy", human, unit_melee, 19, 17, 2, -1);
|
|
define_unit ("Mage", "School of Mana", human, unit_magic, 23, 7, 2, -1);
|
|
define_unit ("Arch-Mage", "Temple of Mana", human, unit_magic, 29, 11, 2, -1);
|
|
define_unit ("Giant", "Mound", human, unit_melee, 41, 59, 1, -1);
|
|
define_unit ("War Giant", "Mound-Fort", human, unit_melee | unit_range, 43, 67, 1, -1);
|
|
define_unit ("Griffin", "Griffin Nest", human, unit_melee, 47, 53, 1, -1);
|
|
define_unit ("Roc", "Heavenly Temple", human, unit_melee | unit_magic, 53, 61, 1, -1);
|
|
define_unit ("Sprite", "Little Lamp", elf, unit_melee, 1, 1, 7, -1);
|
|
define_unit ("Nature Spirit", "Flower Palace", elf, unit_melee, 1, 1, 7, -1);
|
|
define_unit ("Half-Elf", "Slums", elf, unit_melee, 1, 3, 7, -1);
|
|
define_unit ("Ranger", "Ranger Guild", elf, unit_melee, 3, 5, 7, -1);
|
|
define_unit ("Archer", "Arrow House", elf, unit_melee | unit_range, 3, 7, 5, -1);
|
|
define_unit ("Elite Archer", "Arrow Fortress", elf, unit_melee | unit_range, 5, 7, 5, -1);
|
|
define_unit ("Blademaster", "School of Blades", elf, unit_melee | unit_magic, 7, 11, 5, -1);
|
|
define_unit ("Water Mage", "Water Temple", elf, unit_magic, 11, 11, 3, -1);
|
|
define_unit ("Earth Mage", "Earth Temple", elf, unit_magic, 13, 13, 3, -1);
|
|
define_unit ("Wind Mage", "Wind Temple", elf, unit_magic, 13, 17, 2, -1);
|
|
define_unit ("Rune Mage", "Rune Monastery", elf, unit_magic, 17, 19, 2, -1);
|
|
define_unit ("Runemaster", "Ancient Ruins", elf, unit_magic, 19, 23, 2, -1);
|
|
define_unit ("Sacrificer", "Altair", elf, unit_magic, 23, 19, 2, -1);
|
|
define_unit ("Elk Rider", "Elk Ranch-House", elf, unit_melee, 29, 23, 2, -1);
|
|
define_unit ("Warmaster", "Elven Fort", elf, unit_melee | unit_magic, 41, 59, 1, -1);
|
|
define_unit ("Coal Golem", "Old Coal Mine", elf, unit_melee, 43, 53, 1, -1);
|
|
define_unit ("Iron Golem", "Old Iron Mine", elf, unit_melee, 47, 67, 1, -1);
|
|
define_unit ("Sage", "Cabin in the Woods", elf, unit_range | unit_magic, 67, 47, 1, -1);
|
|
|
|
define_block ("Ashland", 0, 12, -1, -1, -1);
|
|
define_block ("Ashdirt", 0, 6, -1, -1, -1);
|
|
define_block ("Ashdust", 0, 6, -1, -1, -1);
|
|
|
|
define_block ("Garbage", block_random, 12, -1, -1, -1);
|
|
|
|
define_block ("Ashdirt", block_up, 1, 0, 1, -1);
|
|
define_block ("Ashdirt", block_down, 1, 0, 1, -1);
|
|
define_block ("Ashdirt", block_left, 1, 0, 1, -1);
|
|
define_block ("Ashdirt", block_right, 1, 0, 1, -1);
|
|
|
|
define_block ("Ashdirt", block_up | block_left, 1, 0, 1, -1);
|
|
define_block ("Ashdirt", block_up | block_right, 1, 0, 1, -1);
|
|
define_block ("Ashdirt", block_down | block_left, 1, 0, 1, -1);
|
|
define_block ("Ashdirt", block_down | block_right, 1, 0, 1, -1);
|
|
define_block ("Ashdirt", block_up | block_left, 1, 1, 0, -1);
|
|
define_block ("Ashdirt", block_up | block_right, 1, 1, 0, -1);
|
|
define_block ("Ashdirt", block_down | block_left, 1, 1, 0, -1);
|
|
define_block ("Ashdirt", block_down | block_right, 1, 1, 0, -1);
|
|
|
|
define_block ("Ashdust", block_up, 1, 0, 2, -1);
|
|
define_block ("Ashdust", block_down, 1, 0, 2, -1);
|
|
define_block ("Ashdust", block_left, 1, 0, 2, -1);
|
|
define_block ("Ashdust", block_right, 1, 0, 2, -1);
|
|
|
|
define_block ("Ashdust", block_up | block_left, 1, 0, 2, -1);
|
|
define_block ("Ashdust", block_up | block_right, 1, 0, 2, -1);
|
|
define_block ("Ashdust", block_down | block_left, 1, 0, 2, -1);
|
|
define_block ("Ashdust", block_down | block_right, 1, 0, 2, -1);
|
|
define_block ("Ashdust", block_up | block_left, 1, 2, 0, -1);
|
|
define_block ("Ashdust", block_up | block_right, 1, 2, 0, -1);
|
|
define_block ("Ashdust", block_down | block_left, 1, 2, 0, -1);
|
|
define_block ("Ashdust", block_down | block_right, 1, 2, 0, -1);
|
|
|
|
define_model ("Redgrass", 0, 1, 1);
|
|
define_model ("Rock", 0, 1, 1);
|
|
define_model ("Rock", 0, 1, 1);
|
|
define_model ("Rock", 0, 1, 1);
|
|
define_model ("Rock", 0, 1, 1);
|
|
define_model ("Bone", 0, 1, 1);
|
|
define_model ("Redgrass", 0, 1, 1);
|
|
define_model ("Rock", 0, 1, 1);
|
|
define_model ("Rock", 0, 1, 1);
|
|
define_model ("Rock", 0, 1, 1);
|
|
define_model ("Rock & Redgrass", 0, 1, 1);
|
|
define_model ("Bones", 0, 1, 1);
|
|
define_model ("Redgrass", 0, 1, 1);
|
|
define_model ("Rock", 0, 1, 1);
|
|
define_model ("Rock", 0, 1, 1);
|
|
define_model ("Redgrass", 0, 1, 1);
|
|
define_model ("Rock", 0, 1, 1);
|
|
define_model ("Rock", 0, 1, 1);
|
|
define_model ("Redgrass", 0, 1, 1);
|
|
define_model ("Rock", 0, 1, 1);
|
|
define_model ("Rock", 0, 1, 1);
|
|
define_model ("Redgrass", 0, 1, 1);
|
|
define_model ("Rock", 0, 1, 1);
|
|
define_model ("Rock", 0, 1, 1);
|
|
define_model ("Skull", 0, 1, 1);
|
|
define_model ("Skull & Bones", 0, 1, 1);
|
|
define_model ("Rock", 0, 1, 1);
|
|
define_model ("Gravestone", 0, 1, 1);
|
|
define_model ("Rock", 0, 1, 1);
|
|
define_model ("Gravestone", 0, 1, 1);
|
|
define_model ("Rock", 0, 1, 1);
|
|
define_model ("Gravestone", 0, 1, 1);
|
|
define_model ("Firewood", 0, 1, 1);
|
|
define_model ("Firewood", 0, 1, 1);
|
|
define_model ("Firewood", 0, 1, 1);
|
|
define_model ("Acid Reed", 0, 1, 1);
|
|
define_model ("Acid Reed", 0, 1, 1);
|
|
define_model ("Acid Reed", 0, 1, 1);
|
|
define_model ("Acid Reed", 0, 1, 1);
|
|
define_model ("Acid Reed", 0, 1, 1);
|
|
define_model ("Acid Reed", 0, 1, 1);
|
|
define_model ("Sign", 0, 1, 1);
|
|
define_model ("Sign", 0, 1, 1);
|
|
define_model ("Sign", 0, 1, 1);
|
|
define_model ("Sign", 0, 1, 1);
|
|
|
|
define_model ("Huge Rock", model_clip, 1, 2);
|
|
define_model ("Huge Acid Reed", model_clip, 1, 2);
|
|
define_model ("Tree Trunk", model_clip, 1, 2);
|
|
define_model ("Tree Trunk", model_clip, 1, 2);
|
|
define_model ("Tree Trunk", model_clip, 1, 2);
|
|
define_model ("Tree Trunk", model_clip, 1, 2);
|
|
define_model ("Huge Rock & Skull", model_clip, 1, 2);
|
|
define_model ("Huge Acid Reed", model_clip, 1, 2);
|
|
|
|
define_model ("Tree Trunk", model_clip, 2, 1);
|
|
define_model ("Tree Trunk", model_clip, 2, 1);
|
|
define_model ("Huge Acid Reed", model_clip, 2, 1);
|
|
define_model ("Huge Acid Reed", model_clip, 2, 1);
|
|
define_model ("Huge Rock", model_clip, 2, 1);
|
|
define_model ("Huge Rock", model_clip, 2, 1);
|
|
define_model ("Huge Sign", model_clip, 2, 1);
|
|
define_model ("Firewood & Bone", model_clip, 2, 1);
|
|
define_model ("Huge Rock & Redgrass", model_clip, 2, 1);
|
|
define_model ("Huge Rock & Skull", model_clip, 2, 1);
|
|
|
|
define_model ("Huge Rocks", model_clip, 2, 2);
|
|
define_model ("Gravestone & Redgrass", model_clip, 2, 2);
|
|
define_model ("Firewood & Redgrass", model_clip, 2, 2);
|
|
|
|
define_model ("Dead Tree", model_clip, 2, 4);
|
|
define_model ("Dead Tree", model_clip, 2, 4);
|
|
|
|
define_model ("Huge Rocks", model_clip, 3, 2);
|
|
|
|
define_model ("Dead Tree", model_clip, 4, 5);
|
|
define_model ("Dead Tree & Skulls", model_clip, 4, 5);
|
|
define_model ("Dead Tree & Acid Reed", model_clip, 4, 5);
|
|
|
|
define_world ("Ashlands", 0XBEEF, 0, block_count);
|
|
|
|
define_player ("Ognjen", player_human, 30, 30);
|
|
|
|
configure ();
|
|
}
|