forked from github/server
- make monster-equipment configurable
- rename some SK_ constants to match their name
This commit is contained in:
parent
78615978c8
commit
1b93b094e4
20 changed files with 63 additions and 63 deletions
|
@ -265,8 +265,8 @@ add_recruits(unit * u, int number, int wanted)
|
||||||
change_level(unew, SK_CROSSBOW, i);
|
change_level(unew, SK_CROSSBOW, i);
|
||||||
if (unew->race->bonus[SK_RIDING] >= 0)
|
if (unew->race->bonus[SK_RIDING] >= 0)
|
||||||
change_level(unew, SK_RIDING, i);
|
change_level(unew, SK_RIDING, i);
|
||||||
if (unew->race->bonus[SK_AUSDAUER] >= 0)
|
if (unew->race->bonus[SK_STAMINA] >= 0)
|
||||||
change_level(unew, SK_AUSDAUER, i);
|
change_level(unew, SK_STAMINA, i);
|
||||||
}
|
}
|
||||||
#endif /* KARMA_MODULE */
|
#endif /* KARMA_MODULE */
|
||||||
if (unew!=u) {
|
if (unew!=u) {
|
||||||
|
@ -2742,8 +2742,8 @@ wahrnehmung(region * r, faction * f)
|
||||||
|
|
||||||
for (u = r->units; u; u = u->next) {
|
for (u = r->units; u; u = u->next) {
|
||||||
if (u->faction == f) {
|
if (u->faction == f) {
|
||||||
if (eff_skill(u, SK_OBSERVATION, r) > w) {
|
if (eff_skill(u, SK_PERCEPTION, r) > w) {
|
||||||
w = eff_skill(u, SK_OBSERVATION, r);
|
w = eff_skill(u, SK_PERCEPTION, r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -910,7 +910,7 @@ plan_dragon(unit * u)
|
||||||
}
|
}
|
||||||
if (long_order==NULL) {
|
if (long_order==NULL) {
|
||||||
long_order = create_order(K_STUDY, u->faction->locale, "'%s'",
|
long_order = create_order(K_STUDY, u->faction->locale, "'%s'",
|
||||||
skillname(SK_OBSERVATION, u->faction->locale));
|
skillname(SK_PERCEPTION, u->faction->locale));
|
||||||
}
|
}
|
||||||
return long_order;
|
return long_order;
|
||||||
}
|
}
|
||||||
|
@ -946,7 +946,7 @@ plan_monsters(void)
|
||||||
/* all monsters fight */
|
/* all monsters fight */
|
||||||
}
|
}
|
||||||
/* Monster bekommen jede Runde ein paar Tage Wahrnehmung dazu */
|
/* Monster bekommen jede Runde ein paar Tage Wahrnehmung dazu */
|
||||||
produceexp(u, SK_OBSERVATION, u->number);
|
produceexp(u, SK_PERCEPTION, u->number);
|
||||||
|
|
||||||
/* Befehle müssen jede Runde neu gegeben werden: */
|
/* Befehle müssen jede Runde neu gegeben werden: */
|
||||||
free_orders(&u->orders);
|
free_orders(&u->orders);
|
||||||
|
@ -1069,10 +1069,7 @@ spawn_dragons(void)
|
||||||
if (fval(r->terrain, SEA_REGION) && rng_int()%10000 < 1) {
|
if (fval(r->terrain, SEA_REGION) && rng_int()%10000 < 1) {
|
||||||
u = createunit(r, monsters, 1, new_race[RC_SEASERPENT]);
|
u = createunit(r, monsters, 1, new_race[RC_SEASERPENT]);
|
||||||
fset(u, UFL_ISNEW|UFL_MOVED);
|
fset(u, UFL_ISNEW|UFL_MOVED);
|
||||||
set_level(u, SK_MAGIC, 4);
|
equip_unit(u, get_equipment("monster_seaserpent"));
|
||||||
set_level(u, SK_OBSERVATION, 3);
|
|
||||||
set_level(u, SK_STEALTH, 2);
|
|
||||||
set_level(u, SK_AUSDAUER, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((rterrain(r) == T_GLACIER || r->terrain == newterrain(T_SWAMP) || rterrain(r) == T_DESERT) && rng_int() % 10000 < (5 + 100 * chaosfactor(r)))
|
if ((rterrain(r) == T_GLACIER || r->terrain == newterrain(T_SWAMP) || rterrain(r) == T_DESERT) && rng_int() % 10000 < (5 + 100 * chaosfactor(r)))
|
||||||
|
@ -1083,12 +1080,8 @@ spawn_dragons(void)
|
||||||
u = createunit(r, monsters, nrand(30, 20) + 1, new_race[RC_DRAGON]);
|
u = createunit(r, monsters, nrand(30, 20) + 1, new_race[RC_DRAGON]);
|
||||||
}
|
}
|
||||||
fset(u, UFL_ISNEW|UFL_MOVED);
|
fset(u, UFL_ISNEW|UFL_MOVED);
|
||||||
|
equip_unit(u, get_equipment("monster_dragon"));
|
||||||
|
|
||||||
set_money(u, u->number * (rng_int() % 500 + 100));
|
|
||||||
set_level(u, SK_MAGIC, 4);
|
|
||||||
set_level(u, SK_OBSERVATION, 1+rng_int()%3);
|
|
||||||
set_level(u, SK_STEALTH, 1);
|
|
||||||
set_level(u, SK_AUSDAUER, 1);
|
|
||||||
if (!quiet) {
|
if (!quiet) {
|
||||||
log_printf("%d %s in %s.\n", u->number,
|
log_printf("%d %s in %s.\n", u->number,
|
||||||
LOC(default_locale, rc_name(u->race, u->number!=1)), regionname(r, NULL));
|
LOC(default_locale, rc_name(u->race, u->number!=1)), regionname(r, NULL));
|
||||||
|
@ -1098,20 +1091,7 @@ spawn_dragons(void)
|
||||||
|
|
||||||
/* add message to the region */
|
/* add message to the region */
|
||||||
ADDMSG(&r->msgs,
|
ADDMSG(&r->msgs,
|
||||||
msg_message("sighting", "region race number",
|
msg_message("sighting", "region race number", r, u->race, u->number));
|
||||||
NULL, u->race, u->number));
|
|
||||||
/* create new message to add to units */
|
|
||||||
msg = msg_message("sighting", "region race number",
|
|
||||||
u->region, u->race, u->number);
|
|
||||||
for (u=r->units;u;u=u->next) freset(u->faction, FFL_SELECT);
|
|
||||||
for (u=r->units;u;u=u->next) {
|
|
||||||
faction * f = u->faction;
|
|
||||||
if (!fval(f, FFL_SELECT)) {
|
|
||||||
add_message(&f->msgs, msg);
|
|
||||||
fset(f, FFL_SELECT);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
msg_release(msg);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -289,7 +289,7 @@ get_allies(region * r, unit * u)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_SWAMP:
|
case T_SWAMP:
|
||||||
if (eff_skill(u, SK_OBSERVATION, r) <= 3) {
|
if (eff_skill(u, SK_PERCEPTION, r) <= 3) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
name = "random_swamp_men";
|
name = "random_swamp_men";
|
||||||
|
|
|
@ -151,7 +151,7 @@ spy_cmd(unit * u, struct order * ord)
|
||||||
|
|
||||||
/* der Spion kann identifiziert werden, wenn das Opfer bessere
|
/* der Spion kann identifiziert werden, wenn das Opfer bessere
|
||||||
* Wahrnehmung als das Ziel Tarnung + Spionage/2 hat */
|
* Wahrnehmung als das Ziel Tarnung + Spionage/2 hat */
|
||||||
observe = eff_skill(target, SK_OBSERVATION, r)
|
observe = eff_skill(target, SK_PERCEPTION, r)
|
||||||
- (effskill(u, SK_STEALTH) + eff_skill(u, SK_SPY, r)/2);
|
- (effskill(u, SK_STEALTH) + eff_skill(u, SK_SPY, r)/2);
|
||||||
|
|
||||||
if (invisible(u, target) >= u->number) {
|
if (invisible(u, target) >= u->number) {
|
||||||
|
@ -162,7 +162,7 @@ spy_cmd(unit * u, struct order * ord)
|
||||||
* Spionageversuch bemerkt wurde. Die Wahrscheinlich dafür ist (100 -
|
* Spionageversuch bemerkt wurde. Die Wahrscheinlich dafür ist (100 -
|
||||||
* SpionageSpion*5 + WahrnehmungOpfer*2)%. */
|
* SpionageSpion*5 + WahrnehmungOpfer*2)%. */
|
||||||
observechance = 1.0 - (eff_skill(u, SK_SPY, r) * 0.05)
|
observechance = 1.0 - (eff_skill(u, SK_SPY, r) * 0.05)
|
||||||
+ (eff_skill(target, SK_OBSERVATION, r) * 0.02);
|
+ (eff_skill(target, SK_PERCEPTION, r) * 0.02);
|
||||||
|
|
||||||
if (chance(observechance)) {
|
if (chance(observechance)) {
|
||||||
ADDMSG(&target->faction->msgs, msg_message("spydetect",
|
ADDMSG(&target->faction->msgs, msg_message("spydetect",
|
||||||
|
@ -553,7 +553,7 @@ sink_ship(region * r, ship * sh, const char *name, char spy, unit * saboteur)
|
||||||
}
|
}
|
||||||
add_message(&f->msgs, sink_msg);
|
add_message(&f->msgs, sink_msg);
|
||||||
vset_erase(&informed, f);
|
vset_erase(&informed, f);
|
||||||
if (spy == 1 && f != saboteur->faction && faction_skill(r, f, SK_OBSERVATION) - eff_skill(saboteur, SK_STEALTH, r) > 0) {
|
if (spy == 1 && f != saboteur->faction && faction_skill(r, f, SK_PERCEPTION) - eff_skill(saboteur, SK_STEALTH, r) > 0) {
|
||||||
/* the unit is discovered */
|
/* the unit is discovered */
|
||||||
ADDMSG(&f->msgs, msg_message("spy_discovered_msg", "unit saboteur ship", lastunit, saboteur, sh));
|
ADDMSG(&f->msgs, msg_message("spy_discovered_msg", "unit saboteur ship", lastunit, saboteur, sh));
|
||||||
if (enemy_discovers_spy_msg==NULL) {
|
if (enemy_discovers_spy_msg==NULL) {
|
||||||
|
@ -595,7 +595,7 @@ sabotage_cmd(unit * u, struct order * ord)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
u2 = shipowner(sh);
|
u2 = shipowner(sh);
|
||||||
skdiff = eff_skill(u, SK_SPY, r)-crew_skill(r, u2->faction, sh, SK_OBSERVATION);
|
skdiff = eff_skill(u, SK_SPY, r)-crew_skill(r, u2->faction, sh, SK_PERCEPTION);
|
||||||
if (try_destruction(u, u2, sh, skdiff)) {
|
if (try_destruction(u, u2, sh, skdiff)) {
|
||||||
sink_ship(r, sh, buffer, 1, u);
|
sink_ship(r, sh, buffer, 1, u);
|
||||||
}
|
}
|
||||||
|
|
|
@ -645,7 +645,7 @@ learn_cmd(unit * u, order * ord)
|
||||||
if (l > 0) {
|
if (l > 0) {
|
||||||
if (sk == SK_CROSSBOW || sk == SK_LONGBOW
|
if (sk == SK_CROSSBOW || sk == SK_LONGBOW
|
||||||
|| sk == SK_CATAPULT || sk == SK_MELEE || sk == SK_SPEAR
|
|| sk == SK_CATAPULT || sk == SK_MELEE || sk == SK_SPEAR
|
||||||
|| sk == SK_AUSDAUER || sk == SK_WEAPONLESS)
|
|| sk == SK_STAMINA || sk == SK_WEAPONLESS)
|
||||||
{
|
{
|
||||||
teach->value += u->number * 5 * (l+1);
|
teach->value += u->number * 5 * (l+1);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -2085,7 +2085,7 @@ do_regenerate(fighter *af)
|
||||||
ta.index = af->fighting;
|
ta.index = af->fighting;
|
||||||
|
|
||||||
while(ta.index--) {
|
while(ta.index--) {
|
||||||
af->person[ta.index].hp += effskill(au, SK_AUSDAUER);
|
af->person[ta.index].hp += effskill(au, SK_STAMINA);
|
||||||
af->person[ta.index].hp = min(unit_max_hp(au), af->person[ta.index].hp);
|
af->person[ta.index].hp = min(unit_max_hp(au), af->person[ta.index].hp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -333,7 +333,7 @@ b_blockfogwall(const border * b, const unit * u, const region * r)
|
||||||
unused(b);
|
unused(b);
|
||||||
unused(r);
|
unused(r);
|
||||||
if (!u) return true;
|
if (!u) return true;
|
||||||
return (boolean)(effskill(u, SK_OBSERVATION) > 4); /* Das ist die alte Nebelwand */
|
return (boolean)(effskill(u, SK_PERCEPTION) > 4); /* Das ist die alte Nebelwand */
|
||||||
}
|
}
|
||||||
|
|
||||||
border_type bt_fogwall = {
|
border_type bt_fogwall = {
|
||||||
|
|
|
@ -106,7 +106,7 @@ slipthru(const region * r, const unit * u, const building * b)
|
||||||
|
|
||||||
if (invisible(u, u2) >= u->number) continue;
|
if (invisible(u, u2) >= u->number) continue;
|
||||||
|
|
||||||
o = eff_skill(u2, SK_OBSERVATION, r);
|
o = eff_skill(u2, SK_PERCEPTION, r);
|
||||||
|
|
||||||
if (o + 2 >= n)
|
if (o + 2 >= n)
|
||||||
return 0; /* entdeckt! */
|
return 0; /* entdeckt! */
|
||||||
|
|
|
@ -1037,7 +1037,7 @@ cansee(const faction * f, const region * r, const unit * u, int modifier)
|
||||||
rings = invisible(u, NULL);
|
rings = invisible(u, NULL);
|
||||||
while (u2) {
|
while (u2) {
|
||||||
if (rings<u->number || invisible(u, u2) < u->number) {
|
if (rings<u->number || invisible(u, u2) < u->number) {
|
||||||
int observation = eff_skill(u2, SK_OBSERVATION, r);
|
int observation = eff_skill(u2, SK_PERCEPTION, r);
|
||||||
|
|
||||||
#ifdef NIGHTEYES
|
#ifdef NIGHTEYES
|
||||||
if (u2->enchanted == SP_NIGHT_EYES && o < NIGHT_EYE_TALENT)
|
if (u2->enchanted == SP_NIGHT_EYES && o < NIGHT_EYE_TALENT)
|
||||||
|
@ -1078,7 +1078,7 @@ cansee_unit(const unit * u, const unit * target, int modifier)
|
||||||
if (rings && invisible(target, u) >= target->number) {
|
if (rings && invisible(target, u) >= target->number) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
o = eff_skill(u, SK_OBSERVATION, target->region);
|
o = eff_skill(u, SK_PERCEPTION, target->region);
|
||||||
|
|
||||||
#ifdef NIGHTEYES
|
#ifdef NIGHTEYES
|
||||||
if (u->enchanted == SP_NIGHT_EYES && o < NIGHT_EYE_TALENT)
|
if (u->enchanted == SP_NIGHT_EYES && o < NIGHT_EYE_TALENT)
|
||||||
|
@ -1121,7 +1121,7 @@ cansee_durchgezogen(const faction * f, const region * r, const unit * u, int mod
|
||||||
|
|
||||||
if (rings && invisible(u, u2) >= u->number) continue;
|
if (rings && invisible(u, u2) >= u->number) continue;
|
||||||
|
|
||||||
o = eff_skill(u2, SK_OBSERVATION, r);
|
o = eff_skill(u2, SK_PERCEPTION, r);
|
||||||
|
|
||||||
#ifdef NIGHTEYES
|
#ifdef NIGHTEYES
|
||||||
if (u2->enchanted == SP_NIGHT_EYES && o < NIGHT_EYE_TALENT)
|
if (u2->enchanted == SP_NIGHT_EYES && o < NIGHT_EYE_TALENT)
|
||||||
|
@ -1853,7 +1853,7 @@ get_lighthouses(const region * r)
|
||||||
if (u->building == b) {
|
if (u->building == b) {
|
||||||
c = true;
|
c = true;
|
||||||
if (c > buildingcapacity(b)) break;
|
if (c > buildingcapacity(b)) break;
|
||||||
if (eff_skill(u, SK_OBSERVATION, r) >= d * 3) {
|
if (eff_skill(u, SK_PERCEPTION, r) >= d * 3) {
|
||||||
unitlist_insert(&ulist, u);
|
unitlist_insert(&ulist, u);
|
||||||
}
|
}
|
||||||
} else if (c) break; /* first unit that's no longer in the house ends the search */
|
} else if (c) break; /* first unit that's no longer in the house ends the search */
|
||||||
|
@ -1878,7 +1878,7 @@ lighthouse_range(const building * b, const faction * f)
|
||||||
c += u->number;
|
c += u->number;
|
||||||
if (c > buildingcapacity(b)) break;
|
if (c > buildingcapacity(b)) break;
|
||||||
if (f==NULL || u->faction == f) {
|
if (f==NULL || u->faction == f) {
|
||||||
int sk = eff_skill(u, SK_OBSERVATION, r) / 3;
|
int sk = eff_skill(u, SK_PERCEPTION, r) / 3;
|
||||||
d = max(d, sk);
|
d = max(d, sk);
|
||||||
d = min(maxd, d);
|
d = min(maxd, d);
|
||||||
if (d==maxd) break;
|
if (d==maxd) break;
|
||||||
|
@ -1914,7 +1914,7 @@ check_leuchtturm(region * r, faction * f)
|
||||||
if (f==NULL || u->faction == f) {
|
if (f==NULL || u->faction == f) {
|
||||||
if (!d) d = distance(r, r2);
|
if (!d) d = distance(r, r2);
|
||||||
if (maxd < d) break;
|
if (maxd < d) break;
|
||||||
if (eff_skill(u, SK_OBSERVATION, r) >= d * 3) return true;
|
if (eff_skill(u, SK_PERCEPTION, r) >= d * 3) return true;
|
||||||
}
|
}
|
||||||
} else if (c) break; /* first unit that's no longer in the house ends the search */
|
} else if (c) break; /* first unit that's no longer in the house ends the search */
|
||||||
}
|
}
|
||||||
|
|
|
@ -819,7 +819,7 @@ use_foolpotion(struct unit *u, int targetno, const struct item_type *itype, int
|
||||||
ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "feedback_unit_not_found", ""));
|
ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "feedback_unit_not_found", ""));
|
||||||
return ECUSTOM;
|
return ECUSTOM;
|
||||||
}
|
}
|
||||||
if (effskill(u, SK_STEALTH)<=effskill(target, SK_OBSERVATION)) {
|
if (effskill(u, SK_STEALTH)<=effskill(target, SK_PERCEPTION)) {
|
||||||
cmistake(u, ord, 64, MSG_EVENT);
|
cmistake(u, ord, 64, MSG_EVENT);
|
||||||
return ECUSTOM;
|
return ECUSTOM;
|
||||||
}
|
}
|
||||||
|
|
|
@ -828,7 +828,7 @@ bewegung_blockiert_von(unit * reisender, region * r)
|
||||||
if (fval(reisender->race, RCF_ILLUSIONARY)) return NULL;
|
if (fval(reisender->race, RCF_ILLUSIONARY)) return NULL;
|
||||||
for (u=r->units;u && !contact;u=u->next) {
|
for (u=r->units;u && !contact;u=u->next) {
|
||||||
if (getguard(u) & GUARD_TRAVELTHRU) {
|
if (getguard(u) & GUARD_TRAVELTHRU) {
|
||||||
int sk = eff_skill(u, SK_OBSERVATION, r);
|
int sk = eff_skill(u, SK_PERCEPTION, r);
|
||||||
if (invisible(reisender, u) >= reisender->number) continue;
|
if (invisible(reisender, u) >= reisender->number) continue;
|
||||||
if (u->faction == reisender->faction) contact = true;
|
if (u->faction == reisender->faction) contact = true;
|
||||||
else if (ucontact(u, reisender)) contact = true;
|
else if (ucontact(u, reisender)) contact = true;
|
||||||
|
@ -1813,7 +1813,7 @@ sail(unit * u, order * ord, boolean move_on_land, region_list **routep)
|
||||||
!alliedunit(hafenmeister, u->faction, HELP_GUARD)) {
|
!alliedunit(hafenmeister, u->faction, HELP_GUARD)) {
|
||||||
|
|
||||||
|
|
||||||
if (effskill(hafenmeister, SK_OBSERVATION) > effskill(u2, SK_STEALTH)) {
|
if (effskill(hafenmeister, SK_PERCEPTION) > effskill(u2, SK_STEALTH)) {
|
||||||
for (itm=u2->items; itm; itm=itm->next) {
|
for (itm=u2->items; itm; itm=itm->next) {
|
||||||
const luxury_type * ltype = resource2luxury(itm->type->rtype);
|
const luxury_type * ltype = resource2luxury(itm->type->rtype);
|
||||||
if (ltype!=NULL && itm->number>0) {
|
if (ltype!=NULL && itm->number>0) {
|
||||||
|
|
|
@ -202,7 +202,7 @@ unit_max_hp(const unit * u)
|
||||||
if (heal_ct==NULL) heal_ct = ct_find("healingzone");
|
if (heal_ct==NULL) heal_ct = ct_find("healingzone");
|
||||||
|
|
||||||
|
|
||||||
p = pow(effskill(u, SK_AUSDAUER) / 2.0, 1.5) * 0.2;
|
p = pow(effskill(u, SK_STAMINA) / 2.0, 1.5) * 0.2;
|
||||||
h += (int) (h * p + 0.5);
|
h += (int) (h * p + 0.5);
|
||||||
|
|
||||||
#if KARMA_MODULE
|
#if KARMA_MODULE
|
||||||
|
|
|
@ -1094,7 +1094,7 @@ view_regatta(struct seen_region ** seen, region * r, faction * f)
|
||||||
int skill = 0;
|
int skill = 0;
|
||||||
for (u=r->units; u; u=u->next) {
|
for (u=r->units; u; u=u->next) {
|
||||||
if (u->faction==f) {
|
if (u->faction==f) {
|
||||||
int es = effskill(u, SK_OBSERVATION);
|
int es = effskill(u, SK_PERCEPTION);
|
||||||
if (es>skill) skill=es;
|
if (es>skill) skill=es;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -236,7 +236,7 @@ rc_skillmod(const struct race * rc, const region *r, skill_t sk)
|
||||||
mods = skill_mod(rc, sk, r->terrain);
|
mods = skill_mod(rc, sk, r->terrain);
|
||||||
#endif
|
#endif
|
||||||
if (rc == new_race[RC_ELF] && r_isforest(r)) switch (sk) {
|
if (rc == new_race[RC_ELF] && r_isforest(r)) switch (sk) {
|
||||||
case SK_OBSERVATION:
|
case SK_PERCEPTION:
|
||||||
++mods;
|
++mods;
|
||||||
break;
|
break;
|
||||||
case SK_STEALTH:
|
case SK_STEALTH:
|
||||||
|
|
|
@ -152,9 +152,8 @@ spawn_braineaters(float chance)
|
||||||
/* Neues Monster ? */
|
/* Neues Monster ? */
|
||||||
if (next-- == 0) {
|
if (next-- == 0) {
|
||||||
unit *u = createunit(r, f0, 1+rng_int()%10+rng_int()%10, new_race[RC_HIRNTOETER]);
|
unit *u = createunit(r, f0, 1+rng_int()%10+rng_int()%10, new_race[RC_HIRNTOETER]);
|
||||||
|
equip_unit(u, get_equipment("monster_braineater"));
|
||||||
|
|
||||||
set_level(u, SK_STEALTH, 1);
|
|
||||||
set_level(u, SK_OBSERVATION, 1);
|
|
||||||
next = rng_int() % (int)(chance*100);
|
next = rng_int() % (int)(chance*100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -297,9 +297,9 @@ enum {
|
||||||
SK_ENTERTAINMENT,
|
SK_ENTERTAINMENT,
|
||||||
SK_WEAPONSMITH,
|
SK_WEAPONSMITH,
|
||||||
SK_CARTMAKER,
|
SK_CARTMAKER,
|
||||||
SK_OBSERVATION,
|
SK_PERCEPTION,
|
||||||
SK_TAXING,
|
SK_TAXING,
|
||||||
SK_AUSDAUER,
|
SK_STAMINA,
|
||||||
SK_WEAPONLESS,
|
SK_WEAPONLESS,
|
||||||
MAXSKILLS,
|
MAXSKILLS,
|
||||||
NOSKILL = (skill_t) -1
|
NOSKILL = (skill_t) -1
|
||||||
|
|
|
@ -1134,7 +1134,7 @@ item_modification(const unit *u, skill_t sk, int val)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if NEWATSROI == 1
|
#if NEWATSROI == 1
|
||||||
if(sk == SK_OBSERVATION) {
|
if(sk == SK_PERCEPTION) {
|
||||||
if(get_item(u, I_AMULET_OF_TRUE_SEEING) >= u->number) {
|
if(get_item(u, I_AMULET_OF_TRUE_SEEING) >= u->number) {
|
||||||
val += ATSBONUS;
|
val += ATSBONUS;
|
||||||
}
|
}
|
||||||
|
@ -1226,7 +1226,7 @@ case SK_HERBALISM:
|
||||||
case SK_MAGIC:
|
case SK_MAGIC:
|
||||||
case SK_SPY:
|
case SK_SPY:
|
||||||
case SK_STEALTH:
|
case SK_STEALTH:
|
||||||
case SK_OBSERVATION:
|
case SK_PERCEPTION:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
skill -= 2;
|
skill -= 2;
|
||||||
|
|
|
@ -784,7 +784,7 @@ sp_shadowcall(fighter * fi, int level, double power, spell * sp)
|
||||||
setstatus(u, ST_FIGHT);
|
setstatus(u, ST_FIGHT);
|
||||||
|
|
||||||
set_level(u, SK_WEAPONLESS, (int)(power/2));
|
set_level(u, SK_WEAPONLESS, (int)(power/2));
|
||||||
set_level(u, SK_AUSDAUER, (int)(power/2));
|
set_level(u, SK_STAMINA, (int)(power/2));
|
||||||
u->hp = u->number * unit_max_hp(u);
|
u->hp = u->number * unit_max_hp(u);
|
||||||
|
|
||||||
a = a_new(&at_unitdissolve);
|
a = a_new(&at_unitdissolve);
|
||||||
|
@ -814,7 +814,7 @@ sp_wolfhowl(fighter * fi, int level, double power, spell * sp)
|
||||||
setstatus(u, ST_FIGHT);
|
setstatus(u, ST_FIGHT);
|
||||||
|
|
||||||
set_level(u, SK_WEAPONLESS, (int)(power/3));
|
set_level(u, SK_WEAPONLESS, (int)(power/3));
|
||||||
set_level(u, SK_AUSDAUER, (int)(power/3));
|
set_level(u, SK_STAMINA, (int)(power/3));
|
||||||
u->hp = u->number * unit_max_hp(u);
|
u->hp = u->number * unit_max_hp(u);
|
||||||
|
|
||||||
if (fval(mage, UFL_PARTEITARNUNG))
|
if (fval(mage, UFL_PARTEITARNUNG))
|
||||||
|
|
|
@ -3318,7 +3318,7 @@ sp_summonshadow(castorder *co)
|
||||||
val = get_level(mage, SK_MAGIC) + get_level(mage, SK_STEALTH);
|
val = get_level(mage, SK_MAGIC) + get_level(mage, SK_STEALTH);
|
||||||
|
|
||||||
set_level(u, SK_STEALTH, val);
|
set_level(u, SK_STEALTH, val);
|
||||||
set_level(u, SK_OBSERVATION, 1);
|
set_level(u, SK_PERCEPTION, 1);
|
||||||
|
|
||||||
ADDMSG(&mage->faction->msgs, msg_message("summonshadow_effect",
|
ADDMSG(&mage->faction->msgs, msg_message("summonshadow_effect",
|
||||||
"mage number", mage, number));
|
"mage number", mage, number));
|
||||||
|
@ -3356,7 +3356,7 @@ sp_summonshadowlords(castorder *co)
|
||||||
|
|
||||||
/* Bekommen Tarnung = Magie und Wahrnehmung 5. */
|
/* Bekommen Tarnung = Magie und Wahrnehmung 5. */
|
||||||
set_level(u, SK_STEALTH, get_level(mage, SK_MAGIC));
|
set_level(u, SK_STEALTH, get_level(mage, SK_MAGIC));
|
||||||
set_level(u, SK_OBSERVATION, 5);
|
set_level(u, SK_PERCEPTION, 5);
|
||||||
|
|
||||||
ADDMSG(&mage->faction->msgs, msg_message("summon_effect", "mage amount race", mage, 1, u->race));
|
ADDMSG(&mage->faction->msgs, msg_message("summon_effect", "mage amount race", mage, 1, u->race));
|
||||||
return cast_level;
|
return cast_level;
|
||||||
|
@ -4326,7 +4326,7 @@ sp_pump(castorder *co)
|
||||||
|
|
||||||
u = create_unit(rt, mage->faction, RS_FARVISION, new_race[RC_SPELL], 0, "spell/pump", NULL);
|
u = create_unit(rt, mage->faction, RS_FARVISION, new_race[RC_SPELL], 0, "spell/pump", NULL);
|
||||||
u->age = 2;
|
u->age = 2;
|
||||||
set_level(u, SK_OBSERVATION, eff_skill(target, SK_OBSERVATION, u->region));
|
set_level(u, SK_PERCEPTION, eff_skill(target, SK_PERCEPTION, u->region));
|
||||||
|
|
||||||
return cast_level;
|
return cast_level;
|
||||||
}
|
}
|
||||||
|
@ -5061,7 +5061,7 @@ sp_dreamreading(castorder *co)
|
||||||
u2 = create_unit(u->region,mage->faction, RS_FARVISION, new_race[RC_SPELL], 0, "spell/dreamreading", NULL);
|
u2 = create_unit(u->region,mage->faction, RS_FARVISION, new_race[RC_SPELL], 0, "spell/dreamreading", NULL);
|
||||||
set_number(u2, 1);
|
set_number(u2, 1);
|
||||||
u2->age = 2; /* Nur für diese Runde. */
|
u2->age = 2; /* Nur für diese Runde. */
|
||||||
set_level(u2, SK_OBSERVATION, eff_skill(u, SK_OBSERVATION, u2->region));
|
set_level(u2, SK_PERCEPTION, eff_skill(u, SK_PERCEPTION, u2->region));
|
||||||
|
|
||||||
msg = msg_message("sp_dreamreading_effect", "mage unit region", mage, u, u->region);
|
msg = msg_message("sp_dreamreading_effect", "mage unit region", mage, u, u->region);
|
||||||
r_addmessage(r, mage->faction, msg);
|
r_addmessage(r, mage->faction, msg);
|
||||||
|
@ -5868,7 +5868,7 @@ sp_viewreality(castorder *co)
|
||||||
region * rt = rl2->data;
|
region * rt = rl2->data;
|
||||||
if (!is_cursed(rt->attribs, C_ASTRALBLOCK, 0)) {
|
if (!is_cursed(rt->attribs, C_ASTRALBLOCK, 0)) {
|
||||||
u = create_unit(rt, mage->faction, RS_FARVISION, new_race[RC_SPELL], 0, "spell/viewreality", NULL);
|
u = create_unit(rt, mage->faction, RS_FARVISION, new_race[RC_SPELL], 0, "spell/viewreality", NULL);
|
||||||
set_level(u, SK_OBSERVATION, co->level/2);
|
set_level(u, SK_PERCEPTION, co->level/2);
|
||||||
u->age = 2;
|
u->age = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -379,5 +379,26 @@
|
||||||
<item name="seaserpenthead" amount="1"/>
|
<item name="seaserpenthead" amount="1"/>
|
||||||
</set>
|
</set>
|
||||||
|
|
||||||
|
<!-- sets that are used by the monster-spawning code -->
|
||||||
|
<set name="monster_dragon">
|
||||||
|
<skill name="magic" level="4"/>
|
||||||
|
<skill name="stealth" level="1"/>
|
||||||
|
<skill name="stamina" level="1"/>
|
||||||
|
<skill name="perception" level="d3"/>
|
||||||
|
<item name="money" amount="d500+99"/>
|
||||||
|
</set>
|
||||||
|
|
||||||
|
<set name="monster_braineater">
|
||||||
|
<skill name="stealth" level="1"/>
|
||||||
|
<skill name="perception" level="1"/>
|
||||||
|
</set>
|
||||||
|
|
||||||
|
<set name="monster_seaserpent">
|
||||||
|
<skill name="magic" level="4"/>
|
||||||
|
<skill name="stealth" level="2"/>
|
||||||
|
<skill name="stamina" level="1"/>
|
||||||
|
<skill name="perception" level="3"/>
|
||||||
|
</set>
|
||||||
|
|
||||||
</equipment>
|
</equipment>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue