Pārlūkot izejas kodu

[added] Willpower adapter

Christine 5 gadi atpakaļ
vecāks
revīzija
e28d889981
1 mainītis faili ar 45 papildinājumiem un 0 dzēšanām
  1. 45 0
      locations/nichUtil.qsrc

+ 45 - 0
locations/nichUtil.qsrc

@@ -1095,4 +1095,49 @@ if $ARGS[0] = 'disableNPC':
 	end
 end
 
+if $ARGS[0] = 'test':
+	act 'Reload': gt 'nichUtil','test'
+	
+
+	gs 'nichUtil','willpowerAction','Open his pants',FUNC('nichUtil','willpowerCost','hj','self','easy'),'',{
+		'Some text gets displayed'
+		
+		gs 'nichUtil','willpowerAction','Touch him',FUNC('nichUtil','willpowerCost','hj','self','hard'),'',{
+			'Some other text gets displayed'
+			act 'Leave': gt 'down'
+		}
+	}
+	
+	gs 'nichUtil','willpowerAction','Go down on him',FUNC('nichUtil','willpowerCost','bj','self','hard'),'',{
+		'Even more text'
+		act 'Leave': gt 'down'
+	}
+	
+end
+
+
+if $ARGS[0] = 'willpowerCost':
+	gs  'willpower', $ARGS[1],$ARGS[2],$ARGS[3]
+	RESULT = will_cost
+end
+
+!! $ARGS[1]: caption
+!! ARGS[2]: willpower cost
+!! $ARGS[3]: whether this action is forced (use 'force')
+!! $ARGS[4]: code
+if $ARGS[0] = 'willpowerAction':
+	if pcs_willpwr >= ARGS[2]:
+		dynamic 'act ''<<$ARGS[1]>> (<<ARGS[2]>> Willpower)'': 
+					cla
+					will_cost = <<ARGS[2]>>
+					gs ''willpower'',''pay'',<<ARGS[3]>>
+					gs ''stat''
+					<<$ARGS[4]>>
+				end'
+	else
+		act $ARGS[1]+ ' (<font color="red">'+ARGS[2]+'</font> Willpower)':'<b><font color="red">You don''t have enough willpower.</font></b>'
+	end
+end
+
+
 --- nichUtil ---------------------------------