diff --git a/data/json/hobbies.json b/data/json/hobbies.json index 58382f6f59776..8154847382fa4 100644 --- a/data/json/hobbies.json +++ b/data/json/hobbies.json @@ -24,6 +24,7 @@ "name": "Crackhead", "description": "Cocaine. It is, indeed, a helluva drug. You blew your money on some dust, and before you knew it you were turning tricks behind the local CVS just to score one more line. Where are you going to get your next fix now?", "points": -1, + "traits": [ "STIMBOOST" ], "addictions": [ { "intensity": 20, "type": "crack" } ] }, { @@ -33,6 +34,7 @@ "name": "Tweaker", "description": "You're not entirely sure what happened last night, but you woke up on the floor and everything has gone completely to shit. The only thing running through your head, though, is where you're gonna find your next hit.", "points": -2, + "traits": [ "STIMBOOST" ], "addictions": [ { "intensity": 30, "type": "amphetamine" } ] }, { @@ -51,6 +53,7 @@ "name": "Alcoholic", "description": "You found solace in the bottom of a bottle. God-damn, you need a drink.", "points": -1, + "traits": [ "DISORGANIZED" ], "addictions": [ { "intensity": 20, "type": "alcohol" } ] }, { @@ -90,6 +93,366 @@ "name": "Camping", "description": "You enjoyed camping in the vast wilderness as a means of escaping the pace of modern life. The wilderness isn't filled with people, so it must be safe. Right? It must be.", "points": 2, - "skills": [ { "level": 2, "name": "survival" }, { "level": 2, "name": "firstaid" } ] + "skills": [ { "level": 2, "name": "survival" }, { "level": 2, "name": "firstaid" } ], + "traits": [ "OUTDOORSMAN" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "hobby_heli_pilot", + "name": "Helicopter Pilot", + "description": "You got your pilot's license, and earned a living ferrying businessmen and tourists around.", + "points": 2, + "skills": [ { "level": 2, "name": "driving" }, { "level": 2, "name": "mechanics" } ], + "proficiencies": [ "prof_helicopter_pilot" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "loves_books", + "name": "Loves Books", + "description": "You love reading, you just never seemed to have enough time. Maybe the cataclysm is a blessing in disguise.", + "points": 1, + "traits": [ "LOVES_BOOKS" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "chem_cooking", + "name": "Chemical Cooking", + "description": "You decided to cook your fix instead of waiting for your next one.", + "points": 2, + "proficiencies": [ "prof_intro_chemistry", "prof_intro_chem_synth" ], + "skills": [ { "level": 3, "name": "chemistry" }, { "level": 1, "name": "cooking" } ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "archery", + "name": "Archery", + "description": "You enjoy nocking back an arrow and hearing them whistle through the air.", + "points": 2, + "skills": [ { "level": 3, "name": "archery" }, { "level": 2, "name": "gun" } ], + "proficiencies": [ "prof_bow_basic" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "swimming", + "name": "Swimming", + "description": "Swimming through water is certainly an advantage you have over the undead.", + "points": 1, + "skills": [ { "level": 3, "name": "swimming" } ], + "traits": [ "OUTDOORSMAN" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "baseball", + "name": "Baseball", + "description": "You got the stance, you got the grip, you got the game. Swinging at a zombie's head is close enough to swinging at a baseball… right?", + "points": 2, + "skills": [ { "level": 3, "name": "bashing" }, { "level": 2, "name": "swimming" } ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "vid_games", + "name": "Video Games", + "description": "You love video games so much that you spent that vast majority of your time playing.", + "points": 1, + "skills": [ { "level": 1, "name": "computer" } ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "trapping", + "name": "Trapping", + "description": "You like to trap little wild animals such as mice and other rodents.", + "points": 2, + "proficiencies": [ "prof_traps", "prof_disarming" ], + "skills": [ { "level": 3, "name": "traps" } ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "dodgeball", + "name": "Dodgeball", + "description": "Dodging fast moving balls as if your life depended on it was fun. Zombies aren't as fun, but your life certainly depends on it.", + "points": 2, + "skills": [ { "level": 3, "name": "dodge" }, { "level": 2, "name": "throw" } ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "amateur_electronics", + "name": "Amateur Electronics", + "description": "You found unexpected solace while soldering components to circuit boards.", + "points": 2, + "proficiencies": [ "prof_elec_soldering" ], + "skills": [ { "level": 3, "name": "electronics" }, { "level": 2, "name": "computer" } ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "diy_crafts", + "name": "DIY Crafts", + "description": "You spent much of your time making something useful out of bits and bobbles.", + "points": 3, + "proficiencies": [ "prof_pottery", "prof_carving", "prof_basketweaving", "prof_elastics", "prof_leatherworking_basic" ], + "skills": [ { "level": 3, "name": "fabrication" }, { "level": 1, "name": "tailor" } ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "cooking", + "name": "Cooking", + "description": "You enjoyed cooking for yourself and others.", + "points": 2, + "proficiencies": [ "prof_baking", "prof_food_prep" ], + "skills": [ { "level": 3, "name": "cooking" } ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "paintball", + "name": "Paintball", + "description": "Shooting your enemies has always been fun. Now you can do it for real.", + "points": 2, + "skills": [ { "level": 3, "name": "rifle" }, { "level": 1, "name": "gun" } ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "plinking", + "name": "Plinking", + "description": "You enjoyed plinking with your airsoft pistol.", + "points": 2, + "skills": [ { "level": 3, "name": "pistol" }, { "level": 1, "name": "gun" } ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "skeet_shooting", + "name": "Skeet Shooting", + "description": "Where the skeet go, your bullet follows. Or atleast, one of them will.", + "points": 2, + "skills": [ { "level": 3, "name": "shotgun" }, { "level": 1, "name": "gun" } ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "public_speaking", + "name": "Public Speaking", + "description": "You were an incredibly social individual.", + "points": 1, + "skills": [ { "level": 3, "name": "speech" } ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "street_fighting", + "name": "Street Fighting", + "description": "You were always instigating fights in the street. Atleast this might come in useful now.", + "points": 2, + "skills": [ { "level": 1, "name": "melee" }, { "level": 3, "name": "unarmed" }, { "level": 2, "name": "dodge" } ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "knife_throwing", + "name": "Knife Throwing", + "description": "Throwing knives are fun and deadly in the right hands.", + "points": 2, + "skills": [ { "level": 3, "name": "throw" } ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "sewing", + "name": "Sewing", + "description": "You used to sew torn clothes back together and even made your own clothes a few times.", + "points": 2, + "proficiencies": [ "prof_closures", "prof_elastics" ], + "skills": [ { "level": 3, "name": "tailor" }, { "level": 1, "name": "fabrication" } ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "fencing", + "name": "Fencing", + "description": "You were in a fencing club, and you weren't too shabby with a saber.", + "points": 2, + "skills": [ { "level": 3, "name": "stabbing" }, { "level": 1, "name": "melee" } ], + "traits": [ "MARTIAL_FENCING" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "car_fan", + "name": "Gearhead", + "description": "You're a big fan of cars and other things that go vroom, whether it's fixing them or driving them. You may not be a professional, but you know your way around an engine.", + "points": 1, + "skills": [ { "level": 3, "name": "driving" }, { "level": 1, "name": "mechanics" } ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "martial_training", + "name": "Martial Training", + "description": "You have received some martial arts training at a local dojo. You start with your choice of Karate, Judo, Aikido, Tai Chi, Taekwondo, or Pankration.", + "points": 4, + "skills": [ { "level": 2, "name": "melee" }, { "level": 3, "name": "unarmed" } ], + "traits": [ "MARTIAL_ARTS" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "self_defense", + "name": "Self-Defense Classes", + "description": "You have taken some self-defense classes at a nearby gym. You start with your choice of Boxing, Capoeira, Krav Maga, Muay Thai, Ninjutsu, Wing Chun, or Zui Quan.", + "points": 4, + "skills": [ { "level": 2, "name": "melee" }, { "level": 3, "name": "unarmed" } ], + "traits": [ "MARTIAL_ARTS2" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "shaolin", + "name": "Shaolin Adept", + "description": "You have studied the arts of the Shaolin monks. You start with one of the five animal fighting styles: Tiger, Crane, Leopard, Snake, or Dragon.", + "points": 4, + "skills": [ { "level": 2, "name": "melee" }, { "level": 3, "name": "unarmed" }, { "level": 3, "name": "dodge" } ], + "traits": [ "MARTIAL_ARTS3" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "melee_training", + "name": "Melee Weapon Training", + "description": "You have practiced fighting with weapons. You start with your choice of Eskrima, Fencing, Fior Di Battaglia, Medieval Swordsmanship, Niten Ichi-Ryu, Pentjak Silat, or Sōjutsu.", + "points": 5, + "skills": [ + { "level": 2, "name": "melee" }, + { "level": 3, "name": "bashing" }, + { "level": 3, "name": "stabbing" }, + { "level": 3, "name": "cutting" } + ], + "traits": [ "MARTIAL_ARTS5" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "gourmand", + "name": "Gourmand", + "description": "You truly enjoy eating and can eat faster, can eat and drink more, than anyone else!", + "points": 3, + "traits": [ "GOURMAND" ], + "skills": [ { "level": 1, "name": "cooking" } ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "hates_books", + "name": "Book hater", + "description": "Reading is for nerds! You've managed to make hatred of the written word a central part of your identity. Or, perhaps, you have a barrier that makes books additionally challenging and frustrating for you. Whatever the reason, boring books are more boring, and you can't have fun by reading books.", + "points": -1, + "traits": [ "HATES_BOOKS" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "hoarder", + "name": "Hoarder", + "description": "You don't feel right unless you're carrying as much as you can. You suffer morale penalties for carrying less than maximum volume (weight is ignored). Xanax can help control this anxiety.", + "points": -3, + "traits": [ "HOARDER" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "nomadic", + "name": "Nomadic", + "description": "You're too adventurous for your own good. The more time you spend somewhere, the unhappier it makes you to be there.", + "points": -1, + "traits": [ "NOMAD" ], + "skills": [ { "level": 1, "name": "survival" }, { "level": 1, "name": "driving" } ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "pyromaniac", + "name": "Pyromaniac", + "description": "You have an unhealthy obsession with fire, and you get anxious if you don't light them every now and then or stand near them often. However, you gain a mood bonus from doing so.", + "points": 0, + "skills": [ { "level": 1, "name": "survival" } ], + "traits": [ "PYROMANIA" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "rigid_table_manners", + "name": "Rigid Table Manners", + "description": "You've been taught proper table manners from your early childhood on; now, you can't even think about eating without being seated at a table and taking your time. Eating without a table and chair frustrates you, but eating like a civilized person gives you a bigger morale bonus.", + "points": -1, + "traits": [ "TABLEMANNERS" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "truthteller", + "name": "Truth Teller", + "description": "When you try to tell a lie, you blush, stammer, and get all shifty-eyed. Telling lies and otherwise bluffing will be much more difficult for you. However, this does make you a good, honest speaker when you're not trying to hide something.", + "points": 0, + "traits": [ "TRUTHTELLER" ], + "skills": [ { "level": 1, "name": "speech" } ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "meatarian", + "name": "Meatarian", + "description": "You absolutely love meat, and dislike eating fruits and vegetables. It's not just a taste thing, it's a lifestyle. You spend a lot of time online telling vegans they are wrong.", + "points": -2, + "traits": [ "ANTIFRUIT", "MEATARIAN" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "vegetarian", + "name": "Vegetarian", + "description": "You have been a vegetarian so long, eating meat makes you sick. You spend a lot of time online telling carnists they are wrong.", + "points": -1, + "traits": [ "VEGETARIAN" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "skating", + "name": "Skating", + "description": "You are skilled in maneuvering on skates. You suffer lower penalties to dodging and are less likely to fall down if hit in melee combat while you're wearing rollerskates or rollerblades.", + "points": 2, + "skills": [ { "level": 2, "name": "dodge" } ], + "traits": [ "PROF_SKATER" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "trickster", + "name": "Trickster", + "description": "Mischief is something of a second nature for you.", + "points": 1, + "skills": [ { "level": 1, "name": "traps" }, { "level": 1, "name": "speech" } ], + "traits": [ "LIAR" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "modelling", + "name": "Modelling", + "description": "Having style and good looks is certainly far more important than practicality.", + "points": 3, + "skills": [ { "level": 2, "name": "speech" }, { "level": 1, "name": "tailor" } ], + "traits": [ "STYLISH" ] } ] diff --git a/data/json/mutations/mutations.json b/data/json/mutations/mutations.json index a8512a38a1512..bce735c11d591 100644 --- a/data/json/mutations/mutations.json +++ b/data/json/mutations/mutations.json @@ -195,7 +195,6 @@ "name": { "str": "Outdoorsman" }, "points": 1, "description": "You are accustomed to being exposed to the elements. This decreases morale penalties for being wet.", - "starting_trait": true, "valid": false, "wet_protection": [ { "part": "head", "neutral": 6 }, @@ -216,7 +215,6 @@ "name": { "str": "Parkour Expert" }, "points": 2, "description": "You're skilled at clearing obstacles; terrain like railings or counters are as easy for you to move on as solid ground.", - "starting_trait": false, "valid": false, "cancels": [ "BADKNEES" ], "movecost_obstacle_modifier": 0.5 @@ -468,7 +466,6 @@ "points": -1, "consume_time_modifier": 1.5, "description": "You've been taught proper table manners from your early childhood on; now, you can't even think about eating without being seated at a table and taking your time. Eating without a table and chair frustrates you, but eating like a civilized person gives you a bigger morale bonus.", - "starting_trait": true, "valid": false }, { @@ -531,7 +528,6 @@ "points": 2, "consume_time_modifier": 1.25, "description": "You eat faster, and can eat and drink more, than anyone else! You also enjoy food more; delicious food is better for your morale, and you don't mind unsavory meals as much. Activate to skip prompt for overeating.", - "starting_trait": true, "category": [ "MOUSE", "LUPINE" ], "valid": false, "active": true, @@ -543,7 +539,6 @@ "name": { "str": "Bookworm" }, "points": 1, "description": "There's nothing quite like the smell of a good book! Books are more fun (or less boring) for you!", - "starting_trait": true, "valid": false, "cancels": [ "ILLITERATE", "HATES_BOOKS" ] }, @@ -648,7 +643,6 @@ "points": 2, "mixed_effect": true, "description": "You have a unique history with stimulants (like coffee or amphetamines). You can tolerate a lot more of them without overdosing, but if you indulge too much, you start seeing things…", - "starting_trait": true, "valid": false }, { @@ -657,7 +651,6 @@ "name": { "str": "Stylish" }, "points": 2, "description": "Practicality is far less important than style. Your morale is improved by wearing fashionable and attractive clothing.", - "starting_trait": true, "valid": false }, { @@ -689,7 +682,6 @@ "points": 1, "description": "You're an excellent navigator and your ability to recognize distant landmarks is unmatched. Your sight radius on the overmap extends beyond the normal range.", "valid": false, - "starting_trait": true, "category": [ "BIRD", "MOUSE" ], "cancels": [ "UNOBSERVANT" ], "overmap_sight": 5 @@ -819,7 +811,6 @@ "name": { "str": "Competitive Fencer" }, "points": 0, "description": "You were an avid fencer, starting with foil and moving onto saber, then épée. You competed nationally and dabbled with some of the historical fencing weapons afforded by HEMA's popularity.", - "starting_trait": false, "initial_ma_styles": [ "style_fencing" ], "valid": false }, @@ -840,7 +831,6 @@ "name": { "str": "Skilled Liar" }, "points": 1, "description": "You have no qualms about bending the truth, and have practically no tells. Telling lies and otherwise bluffing will be much easier for you.", - "starting_trait": true, "cancels": [ "TRUTHTELLER" ], "social_modifiers": { "lie": 40 } }, @@ -1018,7 +1008,6 @@ "points": -1, "description": "You are terrible at organizing and storing your possessions. You retrieve things from containers 10% slower.", "obtain_cost_multiplier": 1.1, - "starting_trait": true, "valid": false, "cancels": [ "PACKMULE" ] }, @@ -1113,8 +1102,8 @@ "name": { "str": "Hates Vegetables" }, "points": -2, "description": "You have problems with eating vegetables. It's possible for you to eat them, but you will suffer morale penalties and obtain less nutrition from them.", - "starting_trait": true, "valid": false, + "starting_trait": true, "vitamins_absorb_multi": [ [ "veggy", [ [ "vitA", 0 ], [ "vitB", 0 ], [ "vitC", 0 ], [ "calcium", 0 ], [ "iron", 0 ] ] ] ], "cancels": [ "HERBIVORE", "RUMINANT", "GRAZER" ] }, @@ -1124,7 +1113,6 @@ "name": { "str": "Hates Books" }, "points": -1, "description": "Reading is for nerds! Boring books are more boring, and you can't have fun by reading books.", - "starting_trait": true, "valid": false, "cancels": [ "ILLITERATE", "LOVES_BOOKS" ] }, @@ -1134,8 +1122,8 @@ "name": { "str": "Hates Fruit" }, "points": -3, "description": "You despise eating fruits. It's possible for you to eat them, but you will suffer morale penalties and obtain less nutrition from them.", - "starting_trait": true, "valid": false, + "starting_trait": true, "vitamins_absorb_multi": [ [ "fruit", [ [ "vitA", 0 ], [ "vitB", 0 ], [ "vitC", 0 ], [ "calcium", 0 ], [ "iron", 0 ] ] ] ], "cancels": [ "HERBIVORE", "RUMINANT", "GRAZER" ] }, @@ -1345,7 +1333,6 @@ "name": { "str": "Hoarder" }, "points": -4, "description": "You don't feel right unless you're carrying as much as you can. You suffer morale penalties for carrying less than maximum volume (weight is ignored). Xanax can help control this anxiety.", - "starting_trait": true, "valid": false }, { @@ -1414,7 +1401,6 @@ "name": { "str": "Truth Teller" }, "points": -1, "description": "When you try to tell a lie, you blush, stammer, and get all shifty-eyed. Telling lies and otherwise bluffing will be much more difficult for you.", - "starting_trait": true, "cancels": [ "LIAR" ], "social_modifiers": { "lie": -40 } }, @@ -6459,7 +6445,6 @@ "type": "mutation", "id": "PYROMANIA", "name": { "str": "Pyromaniac" }, - "starting_trait": true, "points": -2, "description": "You have an unhealthy obsession with fire, and you get anxious if you don't light them every now and then or stand near them often. However, you gain a mood bonus from doing so." }, @@ -6650,7 +6635,6 @@ "name": { "str": "Skater" }, "points": 1, "description": "You are skilled in maneuvering on skates. You suffer lower penalties to dodging and are less likely to fall down if hit in melee combat while you're wearing rollerskates or rollerblades.", - "starting_trait": true, "valid": false }, { @@ -7034,7 +7018,6 @@ "id": "NOMAD", "name": { "str": "Nomad" }, "points": -1, - "starting_trait": true, "description": "You're too adventurous for your own good. The more time you spend somewhere, the unhappier it makes you to be there.", "changes_to": [ "NOMAD2" ], "category": [ "BIRD", "FISH", "CHIMERA" ] diff --git a/src/newcharacter.cpp b/src/newcharacter.cpp index 04be68a33ec12..126918f5d8742 100644 --- a/src/newcharacter.cpp +++ b/src/newcharacter.cpp @@ -2299,8 +2299,27 @@ tab_direction set_hobbies( avatar &u, points_left &points ) desc_offset++; } } else if( action == "CONFIRM" ) { - // Toggle hobby + // Do not allow selection of hobby if there's a trait conflict const profession *prof = &sorted_profs[cur_id].obj(); + bool conflict_found = false; + for( const trait_id &new_trait : prof->get_locked_traits() ) { + if( u.has_conflicting_trait( new_trait ) ) { + for( const profession *hobby : u.hobbies ) { + for( const trait_id &suspect_trait : hobby->get_locked_traits() ) { + if( are_conflicting_traits( new_trait, suspect_trait ) ) { + conflict_found = true; + popup( _( "The trait [%1$s] conflicts with hobby [%2$s]'s trait [%3$s]." ), new_trait->name(), + hobby->gender_appropriate_name( u.male ), suspect_trait->name() ); + } + } + } + } + } + if( conflict_found ) { + continue; + } + + // Toggle hobby if( u.hobbies.count( prof ) == 0 ) { // Add hobby, and decrement point cost u.hobbies.insert( prof ); @@ -2316,20 +2335,6 @@ tab_direction set_hobbies( avatar &u, points_left &points ) u.toggle_trait( trait ); } - // Remove pre-selected traits that conflict with the new hobby's traits - for( const trait_id &new_trait : u.prof->get_locked_traits() ) { - if( u.has_conflicting_trait( new_trait ) ) { - for( const trait_id &suspect_trait : u.get_mutations() ) { - if( are_conflicting_traits( new_trait, suspect_trait ) ) { - u.toggle_trait( suspect_trait ); - points.trait_points += suspect_trait->points; - popup( _( "Your trait %1$s has been removed since it conflicts with the %2$s's %3$s trait." ), - suspect_trait->name(), u.prof->gender_appropriate_name( u.male ), new_trait->name() ); - } - } - } - } - } else if( action == "CHANGE_GENDER" ) { u.male = !u.male; profession_sorter.male = u.male;