Procházet zdrojové kódy

[change] changed contraceptive pill numbers so that missing days reduces effect. Plan B reworked. Fertility pill rework.

maankamara před 1 rokem
rodič
revize
b3e9b9836b
2 změnil soubory, kde provedl 31 přidání a 15 odebrání
  1. 10 5
      locations/din_bad.qsrc
  2. 21 10
      locations/medical_din.qsrc

+ 10 - 5
locations/din_bad.qsrc

@@ -1117,26 +1117,31 @@ if $ARGS[0] = 'takepill':
 		if ptype = 0:
 			pillsleft[ptype] -= 1
 			pcs_skin += 1
-			pillcon += ((pillcon + 15000) / 25) + 4000
+			if pillcon < 37000: pillcon += ((pillcon + 15000) / 10)
+			pillcon += rand(1000,2500)
 		elseif ptype = 1:
 			pillsleft[ptype] -= 1
 			pcs_skin += rand(0,1)
-			pillcon += (( pillcon+ 15000) / 25)+ rand(2000,4000)
+			if pillcon < 35000: pillcon += ((pillcon + 15000) / 25)
+			pillcon += rand(0,3000)
 		elseif ptype = 2:
 			pillsleft[ptype] -= 1
 			pcs_skin += rand(0,1)
-			pillcon += ((pillcon + 15000) / 25)+ rand(500,2000)
+			if pillcon < 33000: pillcon += ((pillcon + 15000) / 25)
+			pillcon += rand(0,2500)
 		elseif ptype = 3:
 			pillsleft[ptype] -= 1
 			pcs_skin += rand(0,1)
+			if pillcon < 30000: pillcon += ((pillcon + 15000) / 25)
 			if rand(0,4) = 0: pain['tummy'] += rand(5,10)
-			pillcon += ((pillcon + 15000) / 25)+ rand(2000,6000)
+			pillcon += rand(0,6000)
 		elseif ptype = 4:
 			pillsleft[ptype] -= 1
 		elseif ptype = 5:
 			pillsleft[ptype] -= 1
 			pcs_skin += 1
-			EggRH += rand(10,80)
+			tempwbbonus += 15
+			if rand(0, (5+10*tempovbonus)) = 0: tempovbonus += 1
 		end
 		
 		!!pillcon2 is the ideal state, PC considers this the believed pillcon value

+ 21 - 10
locations/medical_din.qsrc

@@ -248,16 +248,27 @@ elseif $ARGS[0] = 'healSTDs':
 end
 
 if $ARGS[0] = 'morning_after_pill_function':
-	if arrsize('cumarrcpt') > 0:
-		temp_ID = arrsize('cumarrcpt')
-		:morning_after_womb_cleanup
-		if cumarrcpt[temp_ID] > 0 and sparrloc[temp_ID] = 0:
-			!'Removed <<cumarrcpt[temp_ID]>> sperm at <<cumarrppt[temp_ID]>> potency from <<$npc_usedname[$cumarrnam[temp_ID]]>>.'
-			gs 'cum_cleanup', 'cleanwomb', temp_ID
-		end
-		if temp_ID > 0: temp_ID -= 1 & jump 'morning_after_womb_cleanup'
-		killvar 'temp_ID'
-	end
+!! Old plan B method
+!!	if arrsize('cumarrcpt') > 0:
+!!		temp_ID = arrsize('cumarrcpt')
+!!		:morning_after_womb_cleanup
+!!		if cumarrcpt[temp_ID] > 0 and sparrloc[temp_ID] = 0:
+!!			!'Removed <<cumarrcpt[temp_ID]>> sperm at <<cumarrppt[temp_ID]>> potency from <<$npc_usedname[$cumarrnam[temp_ID]]>>.'
+!!			gs 'cum_cleanup', 'cleanwomb', temp_ID
+!!		end
+!!		if temp_ID > 0: temp_ID -= 1 & jump 'morning_after_womb_cleanup'
+!!		killvar 'temp_ID'
+!!	end
+
+!! Trying different approach. Instead of removing sperm, we impose a multiplier to both fertilization and implant chance
+!! Plan B value is a countdown of hours before ovulation happens for it to have effect, to prevent usage on day 1 of cycle to act for entire month
+!! In effect it reduces egg fertilization chance by 80% and implant by 75% for total of 95% protection if taken before fertilization happens
+!! This should provide a natural decrease in effect as time passes as there is more chance for fertilization to happen the longer the player waits
+!! There will also be no effect if taken over two and half days before ovulation, 60h
+!! Issue: In cases where it is taken within 60h before ovulation this system will provide maximum effect as if taken right after risky act. A more complex timer might be needed?
+!! If this version does not work then we could try counting different timers for both effects. Same timer will not work as implantation can happen up to 350h later
+	planBtaken = 60
+
 	stat['morning_after_pill'] += 1
 	mc_inventory['morning_after_pill'] -= 1
 	if LudaQW['free_condoms'] = 1 and LudaQW['luda_ma_pill'] = 0: LudaQW['luda_ma_pill'] = 1