Tweak Vahnatai PC traits and add Magery item ability

- Vahnatai no longer have a bonus to mage spells (that's now the Magery item ability)
- Vahnatai XP gain bonus changed
- Fix sliths being noted as resistant to poison (they aren't and never have been)
This commit is contained in:
2015-10-03 23:55:52 -04:00
parent 8afd3825b0
commit d908cdff9c
10 changed files with 17 additions and 18 deletions

View File

@@ -1039,7 +1039,7 @@ void do_combat_cast(location target) {
else {
level = 1 + caster.level / 2;
bonus = caster.stat_adj(eSkill::INTELLIGENCE);
if(caster.race == eRace::VAHNATAI && !(*spell_being_cast).is_priest())
if((*spell_being_cast).level <= caster.get_prot_level(eItemAbil::MAGERY))
level++;
if(caster.traits[eTrait::ANAMA] && (*spell_being_cast).is_priest())
level++;
@@ -4785,7 +4785,7 @@ void combat_immed_mage_cast(short current_pc, eSpell spell_num, bool freebie) {
miss_num_t store_m_type = 0;
short bonus = freebie ? 1 : univ.party[current_pc].stat_adj(eSkill::INTELLIGENCE);
short level = freebie ? store_item_spell_level : univ.party[current_pc].level;
if(!freebie && univ.party[current_pc].race == eRace::VAHNATAI)
if(!freebie && (*spell_num).level <= univ.party[current_pc].get_prot_level(eItemAbil::MAGERY))
level++;
cCreature* which_m;
start_missile_anim();

View File

@@ -712,7 +712,7 @@ void do_mage_spell(short pc_num,eSpell spell_num,bool freebie) {
adj = freebie ? 1 : univ.party[pc_num].stat_adj(eSkill::INTELLIGENCE);
short level = freebie ? store_item_spell_level : univ.party[pc_num].level;
if(!freebie && univ.party[pc_num].race == eRace::VAHNATAI)
if(!freebie && (*spell_num).level <= univ.party[pc_num].get_prot_level(eItemAbil::MAGERY))
level++;
switch(spell_num) {
@@ -1340,7 +1340,7 @@ void cast_town_spell(location where) {
ter = univ.town->terrain(where.x,where.y);
short adj = spell_freebie ? 1 : univ.party[who_cast].stat_adj(eSkill::INTELLIGENCE);
short level = spell_freebie ? store_item_spell_level : univ.party[who_cast].level;
if(!spell_freebie && univ.party[who_cast].race == eRace::VAHNATAI && !(*town_spell).is_priest())
if(!spell_freebie && (*town_spell).level <= univ.party[who_cast].get_prot_level(eItemAbil::MAGERY) && !(*town_spell).is_priest())
level++;
if(!spell_freebie && univ.party[who_cast].traits[eTrait::ANAMA] && (*town_spell).is_priest())
level++;

View File

@@ -1171,7 +1171,7 @@ void use_item(short pc,short item) {
case eItemAbil::EXPLODING_WEAPON: case eItemAbil::FREE_ACTION: case eItemAbil::FULL_PROTECTION: case eItemAbil::WILL:
case eItemAbil::GIANT_STRENGTH: case eItemAbil::GRAYMOLD: case eItemAbil::HEALING_WEAPON: case eItemAbil::HEAVIER_OBJECT:
case eItemAbil::HIT_CALL_SPECIAL: case eItemAbil::HOLLY: case eItemAbil::LIFE_SAVING: case eItemAbil::LIGHTER_OBJECT:
case eItemAbil::LOCKPICKS: case eItemAbil::MANDRAKE: case eItemAbil::MARTYRS_SHIELD: case eItemAbil::UNUSED2:
case eItemAbil::LOCKPICKS: case eItemAbil::MANDRAKE: case eItemAbil::MARTYRS_SHIELD: case eItemAbil::MAGERY:
case eItemAbil::NETTLE: case eItemAbil::NONE: case eItemAbil::OCCASIONAL_STATUS: case eItemAbil::POISON_AUGMENT:
case eItemAbil::PROTECT_FROM_PETRIFY: case eItemAbil::PROTECT_FROM_SPECIES: case eItemAbil::RADIANT:
case eItemAbil::REGENERATE: case eItemAbil::RESURRECTION_BALM: case eItemAbil::RETURNING_MISSILE: case eItemAbil::SAPPHIRE:

View File

@@ -965,7 +965,7 @@ std::string cItem::getAbilName() const {
bool party = abil_group();
std::ostringstream sout;
switch(ability) {
case eItemAbil::UNUSED: case eItemAbil::UNUSED2: break; // Invalid
case eItemAbil::UNUSED: break; // Invalid
case eItemAbil::NONE: sout << "No ability"; break;
case eItemAbil::HEALING_WEAPON: sout << "Heals target"; break;
case eItemAbil::RETURNING_MISSILE: sout << "Returning missile"; break;
@@ -986,6 +986,7 @@ std::string cItem::getAbilName() const {
case eItemAbil::BOOST_MAGIC: sout << "Mage's Mantle"; break;
case eItemAbil::ACCURACY: sout << "Accuracy"; break;
case eItemAbil::THIEVING: sout << "Thieving"; break;
case eItemAbil::MAGERY: sout << "Magery"; break;
case eItemAbil::GIANT_STRENGTH: sout << "Giant Strength"; break;
case eItemAbil::LIGHTER_OBJECT: sout << "Lighter Object"; break;
case eItemAbil::HEAVIER_OBJECT: sout << "Heavier Object"; break;

View File

@@ -62,7 +62,7 @@ void cPlayer::append(legacy::pc_record_type old){
short cPlayer::get_tnl(){
short tnl = 100,store_per = 100;
// Omitting a race from this list gives it a value of 0, thanks to the defaulting implementation of operator[]
static std::map<const eRace, const int> rp = {{eRace::NEPHIL,12},{eRace::SLITH,20},{eRace::VAHNATAI,-5}};
static std::map<const eRace, const int> rp = {{eRace::NEPHIL,12},{eRace::SLITH,20},{eRace::VAHNATAI,18}};
static std::map<const eTrait, const short> ap = {
{eTrait::TOUGHNESS,10}, {eTrait::MAGICALLY_APT,20}, {eTrait::AMBIDEXTROUS,8}, {eTrait::NIMBLE,10}, {eTrait::CAVE_LORE,4},
{eTrait::WOODSMAN,6}, {eTrait::GOOD_CONST,10}, {eTrait::HIGHLY_ALERT,7}, {eTrait::STRENGTH,12}, {eTrait::RECUPERATION,15},
@@ -789,6 +789,7 @@ void cPlayer::finish_create() {
items[1] = cItem('helm');
break;
case eRace::VAHNATAI:
// TODO: Should they have a robe instead of a knife?
items[0] = cItem('nife');
items[1] = cItem('rdsk');
break;

View File

@@ -397,7 +397,7 @@ enum class eItemAbil {
// General abilities
DAMAGE_PROTECTION = 30,
FULL_PROTECTION = 31,
UNUSED2 = 32,
MAGERY = 32,
EVASION = 33,
MARTYRS_SHIELD = 34,
ENCUMBERING = 35,