Advertisement
Guest User

permamark-patch

a guest
Jul 3rd, 2014
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 11.40 KB | None | 0 0
  1. diff --git a/crawl-ref/source/aptitudes.h b/crawl-ref/source/aptitudes.h
  2. index 6abad71..544929b 100644
  3. --- a/crawl-ref/source/aptitudes.h
  4. +++ b/crawl-ref/source/aptitudes.h
  5. @@ -1484,6 +1484,45 @@ static const species_skill_aptitude species_skill_aptitudes[] =
  6.      APT(SP_VINE_STALKER,    SK_POISON_MAGIC,    0),
  7.      APT(SP_VINE_STALKER,    SK_INVOCATIONS,     0),
  8.      APT(SP_VINE_STALKER,    SK_EVOCATIONS,      0),
  9. +
  10. +    // SP_ACCURSED
  11. +    APT(SP_ACCURSED,           SK_FIGHTING,        1),
  12. +    APT(SP_ACCURSED,           SK_SHORT_BLADES,    1),
  13. +    APT(SP_ACCURSED,           SK_LONG_BLADES,     1),
  14. +    APT(SP_ACCURSED,           SK_AXES,            1),
  15. +    APT(SP_ACCURSED,           SK_MACES_FLAILS,    1),
  16. +    APT(SP_ACCURSED,           SK_POLEARMS,        1),
  17. +    APT(SP_ACCURSED,           SK_STAVES,          1),
  18. +    APT(SP_ACCURSED,           SK_SLINGS,          1),
  19. +    APT(SP_ACCURSED,           SK_BOWS,            1),
  20. +    APT(SP_ACCURSED,           SK_CROSSBOWS,       1),
  21. +    APT(SP_ACCURSED,           SK_THROWING,        1),
  22. +    APT(SP_ACCURSED,           SK_ARMOUR,          1),
  23. +    APT(SP_ACCURSED,           SK_DODGING,         1),
  24. +    APT(SP_ACCURSED,           SK_STEALTH,         1),
  25. +#if TAG_MAJOR_VERSION == 34
  26. +    APT(SP_ACCURSED,           SK_STABBING,      -99),
  27. +#endif
  28. +    APT(SP_ACCURSED,           SK_SHIELDS,         1),
  29. +#if TAG_MAJOR_VERSION == 34
  30. +    APT(SP_ACCURSED,           SK_TRAPS,         -99),
  31. +#endif
  32. +    APT(SP_ACCURSED,           SK_UNARMED_COMBAT,  1),
  33. +    APT(SP_ACCURSED,           SK_SPELLCASTING,    1),
  34. +    APT(SP_ACCURSED,           SK_CONJURATIONS,    1),
  35. +    APT(SP_ACCURSED,           SK_HEXES,           1),
  36. +    APT(SP_ACCURSED,           SK_CHARMS,          1),
  37. +    APT(SP_ACCURSED,           SK_SUMMONINGS,      1),
  38. +    APT(SP_ACCURSED,           SK_NECROMANCY,      1),
  39. +    APT(SP_ACCURSED,           SK_TRANSLOCATIONS,  1),
  40. +    APT(SP_ACCURSED,           SK_TRANSMUTATIONS,  1),
  41. +    APT(SP_ACCURSED,           SK_FIRE_MAGIC,      1),
  42. +    APT(SP_ACCURSED,           SK_ICE_MAGIC,       1),
  43. +    APT(SP_ACCURSED,           SK_AIR_MAGIC,       1),
  44. +    APT(SP_ACCURSED,           SK_EARTH_MAGIC,     1),
  45. +    APT(SP_ACCURSED,           SK_POISON_MAGIC,    1),
  46. +    APT(SP_ACCURSED,           SK_INVOCATIONS,    -1),
  47. +    APT(SP_ACCURSED,           SK_EVOCATIONS,      1),
  48.  };
  49.  
  50.  #endif
  51. diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
  52. index 48bc409..c3c39b0 100644
  53. --- a/crawl-ref/source/enum.h
  54. +++ b/crawl-ref/source/enum.h
  55. @@ -3463,6 +3463,7 @@ enum mutation_type
  56.      MUT_FLAME_CLOUD_IMMUNITY,
  57.  #endif
  58.      MUT_FORLORN,
  59. +    MUT_MARK,
  60.      MUT_PLACID_MAGIC,
  61.      NUM_MUTATIONS,
  62.  
  63. @@ -3825,7 +3826,8 @@ enum species_type
  64.      SP_GARGOYLE,
  65.      SP_FORMICID,
  66.      SP_VINE_STALKER,
  67. -    LAST_VALID_SPECIES = SP_VINE_STALKER,
  68. +    SP_ACCURSED,
  69. +    LAST_VALID_SPECIES = SP_ACCURSED,
  70.  // The high scores viewer still needs enums for removed species.
  71.      SP_ELF,                            // (placeholder)
  72.      SP_HILL_DWARF,                     // (placeholder)
  73. diff --git a/crawl-ref/source/mon-behv.cc b/crawl-ref/source/mon-behv.cc
  74. index c87aa51..d98ccd0 100644
  75. --- a/crawl-ref/source/mon-behv.cc
  76. +++ b/crawl-ref/source/mon-behv.cc
  77. @@ -807,7 +807,7 @@ void handle_behaviour(monster* mon)
  78.  
  79.              // Creatures not currently pursuing another foe are
  80.              // alerted by a sentinel's mark
  81. -            if (mon->foe == MHITNOT && you.duration[DUR_SENTINEL_MARK]
  82. +            if (mon->foe == MHITNOT && (you.duration[DUR_SENTINEL_MARK] || you.mutation[MUT_MARK])
  83.                  && (!isFriendly && !mons_is_avatar(mon->type) && !isNeutral
  84.                      && !isPacified
  85.                      || mon->has_ench(ENCH_INSANE)))
  86. diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
  87. index c47f3f0..1bf3c03 100644
  88. --- a/crawl-ref/source/mon-util.cc
  89. +++ b/crawl-ref/source/mon-util.cc
  90. @@ -4763,7 +4763,7 @@ mon_threat_level_type mons_threat_level(const monster *mon, bool real)
  91.  bool mons_foe_is_marked(const monster* mon)
  92.  {
  93.      if (mon->foe == MHITYOU)
  94. -        return you.duration[DUR_SENTINEL_MARK];
  95. +        return (you.duration[DUR_SENTINEL_MARK] || you.mutation[MUT_MARK]);
  96.      else
  97.          return false;
  98.  }
  99. diff --git a/crawl-ref/source/mutation-data.h b/crawl-ref/source/mutation-data.h
  100. index 5c79889..8a7a144 100644
  101. --- a/crawl-ref/source/mutation-data.h
  102. +++ b/crawl-ref/source/mutation-data.h
  103. @@ -1045,6 +1045,16 @@ static const mutation_def mut_data[] =
  104.      "forlorn"
  105.  },
  106.  
  107. +{ MUT_MARK,                      3,  1,  MUTFLAG_BAD, false,
  108. +    "marked",
  109. +
  110. +    {"Your position is always known to enemies.","",""},
  111. +    {"You feel obvious.","",""},
  112. +    {"You feel less known.","",""},
  113. +
  114. +    "marked"
  115. +},
  116. +
  117.  { MUT_STOCHASTIC_TORMENT_RESISTANCE,  0,  1, MUTFLAG_GOOD, false,
  118.    "50% torment resistance",
  119.  
  120. diff --git a/crawl-ref/source/ng-restr.cc b/crawl-ref/source/ng-restr.cc
  121. index 8bf8a8b..6f0cd70 100644
  122. --- a/crawl-ref/source/ng-restr.cc
  123. +++ b/crawl-ref/source/ng-restr.cc
  124. @@ -29,7 +29,8 @@ char_choice_restriction species_allowed(job_type job, species_type speci)
  125.          case SP_MINOTAUR:
  126.          case SP_GARGOYLE:
  127.          case SP_CENTAUR:
  128. -            return CC_UNRESTRICTED;
  129. +        case SP_ACCURSED:
  130. +          return CC_UNRESTRICTED;
  131.          default:
  132.              return CC_RESTRICTED;
  133.          }
  134. @@ -45,6 +46,7 @@ char_choice_restriction species_allowed(job_type job, species_type speci)
  135.          case SP_MINOTAUR:
  136.          case SP_GARGOYLE:
  137.          case SP_CENTAUR:
  138. +        case SP_ACCURSED:
  139.              return CC_UNRESTRICTED;
  140.          default:
  141.              return CC_RESTRICTED;
  142. @@ -190,6 +192,7 @@ char_choice_restriction species_allowed(job_type job, species_type speci)
  143.          case SP_OCTOPODE:
  144.          case SP_HUMAN:
  145.          case SP_MUMMY:
  146. +        case SP_ACCURSED:
  147.              return CC_UNRESTRICTED;
  148.          default:
  149.              return CC_RESTRICTED;
  150. @@ -204,6 +207,7 @@ char_choice_restriction species_allowed(job_type job, species_type speci)
  151.          case SP_TENGU:
  152.          case SP_BASE_DRACONIAN:
  153.          case SP_DEMIGOD:
  154. +        case SP_ACCURSED:
  155.              return CC_UNRESTRICTED;
  156.          default:
  157.              return CC_RESTRICTED;
  158. @@ -263,6 +267,7 @@ char_choice_restriction species_allowed(job_type job, species_type speci)
  159.          case SP_DEMIGOD:
  160.          case SP_DEMONSPAWN:
  161.          case SP_TROLL:
  162. +        case SP_ACCURSED:
  163.              return CC_UNRESTRICTED;
  164.          default:
  165.              return CC_RESTRICTED;
  166. @@ -278,6 +283,7 @@ char_choice_restriction species_allowed(job_type job, species_type speci)
  167.          case SP_TENGU:
  168.          case SP_DEMIGOD:
  169.          case SP_GARGOYLE:
  170. +        case SP_ACCURSED:
  171.              return CC_UNRESTRICTED;
  172.          default:
  173.              return CC_RESTRICTED;
  174. @@ -414,6 +420,7 @@ char_choice_restriction species_allowed(job_type job, species_type speci)
  175.          case SP_BASE_DRACONIAN:
  176.          case SP_HUMAN:
  177.          case SP_DEMONSPAWN:
  178. +        case SP_ACCURSED:
  179.              return CC_UNRESTRICTED;
  180.          default:
  181.              return CC_RESTRICTED;
  182. @@ -836,6 +843,20 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
  183.              default:
  184.                  return CC_RESTRICTED;
  185.          }
  186. +    case SP_ACCURSED:
  187. +        switch (job)
  188. +        {
  189. +            case JOB_MONK:
  190. +            case JOB_FIRE_ELEMENTALIST:
  191. +            case JOB_SKALD:
  192. +            case JOB_HUNTER:
  193. +            case JOB_NECROMANCER:
  194. +            case JOB_EARTH_ELEMENTALIST:
  195. +            case JOB_ICE_ELEMENTALIST:
  196. +                return CC_UNRESTRICTED;
  197. +            default:
  198. +                return CC_RESTRICTED;
  199. +        }
  200.      default:
  201.          return CC_BANNED;
  202.      }
  203. diff --git a/crawl-ref/source/ng-setup.cc b/crawl-ref/source/ng-setup.cc
  204. index 796a7fd..3b61e7c 100644
  205. --- a/crawl-ref/source/ng-setup.cc
  206. +++ b/crawl-ref/source/ng-setup.cc
  207. @@ -80,6 +80,7 @@ static void _species_stat_init(species_type which_species)
  208.      case SP_TENGU:              s =  8; i =  8; d =  9;      break;  // 25
  209.      case SP_FORMICID:           s = 12; i =  7; d =  6;      break;  // 25
  210.      case SP_VINE_STALKER:       s = 10; i =  8; d =  9;      break;  // 27
  211. +    case SP_ACCURSED:           s = 9;  i =  9; d =  9;      break;  // 27
  212.  
  213.      case SP_KOBOLD:             s =  6; i =  6; d = 11;      break;  // 23
  214.      case SP_HALFLING:           s =  8; i =  7; d =  9;      break;  // 24
  215. @@ -331,6 +332,10 @@ void give_basic_mutations(species_type speci)
  216.          you.mutation[MUT_NO_DEVICE_HEAL] = 3;
  217.          you.mutation[MUT_ROT_IMMUNITY]   = 1;
  218.          break;
  219. +    case SP_ACCURSED:
  220. +        you.mutation[MUT_FORLORN] = 1;
  221. +        you.mutation[MUT_MARK] = 1;
  222. +        break;
  223.      default:
  224.          break;
  225.      }
  226. diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
  227. index 9053caa..fc8a8a6 100644
  228. --- a/crawl-ref/source/player.cc
  229. +++ b/crawl-ref/source/player.cc
  230. @@ -8083,13 +8083,17 @@ void player::sentinel_mark(bool trap)
  231.          mpr("The mark upon you grows brighter.");
  232.          increase_duration(DUR_SENTINEL_MARK, random_range(20, 40), 180);
  233.      }
  234. -    else
  235. +    else if (!you.mutation[MUT_MARK])
  236.      {
  237.          mprf(MSGCH_WARN, "A sentinel's mark forms upon you.");
  238.          increase_duration(DUR_SENTINEL_MARK, trap ? random_range(25, 40)
  239.                                                    : random_range(35, 60),
  240.                            250);
  241.      }
  242. +    else // Player has permamark
  243. +    {
  244. +       mprf(MSGCH_WARN, "Your innate mark wards off the nostile enchantment.");
  245. +    }
  246.  }
  247.  
  248.  bool player::made_nervous_by(const coord_def &p)
  249. diff --git a/crawl-ref/source/species.cc b/crawl-ref/source/species.cc
  250. index 7d94cef..b8120ee 100644
  251. --- a/crawl-ref/source/species.cc
  252. +++ b/crawl-ref/source/species.cc
  253. @@ -30,6 +30,7 @@ static species_type species_order[] =
  254.      SP_VINE_STALKER,
  255.      // celestial species
  256.      SP_DEMIGOD,        SP_DEMONSPAWN,
  257. +    SP_ACCURSED,
  258.      // undead species
  259.      SP_MUMMY,          SP_GHOUL,
  260.      SP_VAMPIRE,
  261. @@ -203,6 +204,7 @@ string species_name(species_type speci, bool genus, bool adj)
  262.          case SP_TENGU:    res = "Tengu";    break;
  263.          case SP_GARGOYLE: res = "Gargoyle"; break;
  264.          case SP_FORMICID: res = "Formicid"; break;
  265. +        case SP_ACCURSED: res = "Accursed"; break;
  266.  
  267.          case SP_VINE_STALKER:
  268.              res = (adj ? "Vine" : genus ? "Vine" : "Vine Stalker");
  269. @@ -386,6 +388,8 @@ monster_type player_species_to_mons_species(species_type species)
  270.          return MONS_MINOTAUR;
  271.      case SP_DEMONSPAWN:
  272.          return MONS_DEMONSPAWN;
  273. +    case SP_ACCURSED:
  274. +        return MONS_HUMAN;
  275.      case SP_GARGOYLE:
  276.          return MONS_GARGOYLE;
  277.      case SP_GHOUL:
  278. @@ -459,6 +463,7 @@ int species_exp_modifier(species_type species)
  279.      case SP_HALFLING:
  280.      case SP_KOBOLD:
  281.      case SP_FORMICID:
  282. +    case SP_ACCURSED:
  283.          return 1;
  284.      case SP_HILL_ORC:
  285.      case SP_OGRE:
  286. @@ -530,6 +535,7 @@ int species_hp_modifier(species_type species)
  287.          return -1;
  288.      default:
  289.          return 0;
  290. +    case SP_ACCURSED:
  291.      case SP_CENTAUR:
  292.      case SP_DEMIGOD:
  293.      case SP_BASE_DRACONIAN:
  294. @@ -576,6 +582,7 @@ int species_mp_modifier(species_type species)
  295.      case SP_TENGU:
  296.      case SP_VINE_STALKER:
  297.      case SP_FORMICID:
  298. +    case SP_ACCURSED:
  299.          return 1;
  300.      case SP_FELID:
  301.      case SP_HIGH_ELF:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement