Browse Source

add `personality` to `startingCharacters`

Stephan Fuchs 3 tháng trước cách đây
mục cha
commit
ffbada0375

+ 2 - 0
sugarcube/src/interfaces.d.ts

@@ -443,6 +443,8 @@ declare global {
 			 */
 			pc?:{ [key: string]: any; }
 
+			personality?:{ [key: string]: number; }
+
 			quests?:{
 				[key: string]: boolean;
 			}

+ 24 - 20
sugarcube/src/start/startingCharacters/StartingCharacters.ts

@@ -66,6 +66,10 @@ setup.startingCharacterApply = function(characterId){
 		}
 	}
 
+	for(const [_key,_value] of Object.entries(startCharacterData.personality ?? {})){
+		variables.pc.personalityScale(_key).current = _value;
+	}
+
 	for(const [_key,_value] of Object.entries(startCharacterData.quests ?? {})){
 		if(_value === true){
 			variables.quest(_key).start();
@@ -285,10 +289,10 @@ setup.startingCharacters.nerd = {
 		computer:20,
 		gaming:20,
 		highHeels:5,
-		inhibition:10,
+		
 		intelligence:45,
 		makeup:15,
-	},
+	},personality:{exhibitionism:10},
 	items:{
 		nerd_startarting_book_1:{
 			generateFunction:'generateBook',
@@ -348,13 +352,13 @@ setup.startingCharacters.nerd_queen = {
 	skills:{
 		charisma:40,
 		highHeels:25,
-		inhibition:20,
+		
 		makeup:30,
 		people:20,
 		persuasion:20,
 		iceskating:10,
 		spirit:40,
-	},
+	},personality:{exhibitionism:20},
 	
 	items:{
 		cosmetics:10,
@@ -503,7 +507,7 @@ setup.startingCharacters.jock = {
 		football:10,
 		highHeels:20,
 		iceskating:20,
-		inhibition:20,
+		
 		makeup:30,
 		people:10,
 		reaction:45,
@@ -513,7 +517,7 @@ setup.startingCharacters.jock = {
 		vitality:45,
 		volleyball:10,
 
-	},
+	},personality:{exhibitionism:20},
 
 	items:{
 		cosmetics: 10,
@@ -607,11 +611,11 @@ setup.startingCharacters.dancer = {
 		charisma:40,
 		dance:50,
 		highHeels:30,
-		inhibition:30,
+		
 		makeup:40,
 		perform:35,
 		spirit:45,
-	},
+	},personality:{exhibitionism:30},
 	finances:{
 	},
 	items:{
@@ -689,14 +693,14 @@ setup.startingCharacters.cool = {
 		dance:10,
 		highHeels:30,
 		iceskating:10,
-		inhibition:20,
+		
 		makeup:40,
 		people:30,
 		perception: 45,
 		persuasion: 30,
 		spirit:45,
 
-	},
+	},personality:{exhibitionism:20},
 	finances:{
 		cash: 3000
 	},
@@ -759,11 +763,11 @@ setup.startingCharacters.beautiful = {
 	},
 	skills:{
 		highHeels:40,
-		inhibition:25,
+		
 		makeup:50,
 		people:20,
 
-	},
+	},personality:{exhibitionism:25},
 	finances:{
 	},
 	items:{
@@ -828,7 +832,7 @@ setup.startingCharacters.gopnik = {
 	skills:{
 		agility:40,
 		highHeels:10,
-		inhibition:25,
+		
 		makeup:25,
 		people:10,
 		reaction:40,
@@ -837,7 +841,7 @@ setup.startingCharacters.gopnik = {
 		strength: 50,
 		vitality: 40,
 
-	},
+	},personality:{exhibitionism:25},
 	finances:{
 	},
 	items:{
@@ -928,7 +932,7 @@ setup.startingCharacters.troublemaker = {
 	},
 	skills:{
 		defense:20,
-		inhibition:30,
+		
 		jabs: 20,
 		kick: 20,
 		punch: 20,
@@ -936,7 +940,7 @@ setup.startingCharacters.troublemaker = {
 		strength: 60,
 		vitality: 40,
 
-	},
+	},personality:{exhibitionism:30},
 	traits:{
 		nerd_points:-50,
 	},
@@ -982,7 +986,7 @@ setup.startingCharacters.troublemaker = {
 	},
 	skills:{
 		defense:20,
-		inhibition:30,
+		
 		jabs: 20,
 		kick: 20,
 		punch: 20,
@@ -990,7 +994,7 @@ setup.startingCharacters.troublemaker = {
 		strength: 60,
 		vitality: 40,
 
-	},
+	},personality:{exhibitionism:30},
 	traits:{
 		nerd_points:-50,
 	},
@@ -1038,7 +1042,7 @@ setup.startingCharacters.outcast = {
 	skills:{
 		agility:40,
 		highHeels:10,
-		inhibition:25,
+		
 		makeup:25,
 		people:10,
 		reaction:40,
@@ -1047,7 +1051,7 @@ setup.startingCharacters.outcast = {
 		strength: 50,
 		vitality: 40,
 
-	},
+	},personality:{exhibitionism:25},
 	finances:{
 	},
 	items:{

+ 4 - 4
sugarcube/src/start/startingCharacters/debugStarts.ts

@@ -17,10 +17,10 @@ setup.startingCharacters.debug = {
 		computer:20,
 		gaming:20,
 		highHeels:5,
-		inhibition:10,
+		
 		intelligence:45,
 		makeup:15,
-	},
+	},personality:{exhibitionism:10},
 	items:{
 		nerd_startarting_book_1:{
 			generateFunction:'generateBook',
@@ -80,13 +80,13 @@ setup.startingCharacters.debug1 = {
 	skills:{
 		charisma:40,
 		highHeels:25,
-		inhibition:20,
+		
 		makeup:30,
 		people:20,
 		persuasion:20,
 		iceskating:10,
 		spirit:40,
-	},
+	},personality:{exhibitionism:20},
 	
 	items:{
 		cosmetics:10,