forked from acegiak/qudkissing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRomanceFollowBoon.cs
51 lines (41 loc) · 2.01 KB
/
RomanceFollowBoon.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using System;
using XRL.Core;
using XRL.UI;
using XRL.Rules;
using XRL.World.Capabilities;
namespace XRL.World.Parts
{
// public class acegiak_RomancePreferenceResult{
// public string explanation;
// public float amount;
// public acegiak_RomancePreferenceResult(float amount,string explanation){
// this.amount = amount;
// this.explanation = explanation;
// }
// }
[Serializable]
public class acegiak_FollowBoon: acegiak_RomanceBoon
{
public acegiak_FollowBoon(acegiak_Romancable romancable){
Romancable = romancable;
}
public override bool BoonPossible(GameObject talker){
return true;
}
public override bool BoonReady(GameObject player){
int? difference = DifficultyEvaluation.GetDifficultyRating(Romancable.ParentObject,player);
if(difference == null){difference = 0;}
return this.Romancable.ParentObject.pBrain.GetFeeling(player) > 65 + difference;
}
public override acegiak_RomanceChatNode BuildNode(acegiak_RomanceChatNode node){
node.Text = "I have a suggestion: I would like to join you and follow you on your adventures.";
node.AddChoice("End","Very well. [Accept "+this.Romancable.ParentObject.the+this.Romancable.ParentObject.DisplayNameOnly+" into your party].","Excellent! We will have many adventures together!",-30,delegate(){
this.Romancable.ParentObject.GetPart<Brain>().BecomeCompanionOf(XRLCore.Core.Game.Player.Body);
this.Romancable.ParentObject.GetPart<Brain>().IsLedBy(XRLCore.Core.Game.Player.Body);
this.Romancable.ParentObject.GetPart<Brain>().Goals.Clear();
Popup.Show(this.Romancable.ParentObject.The+this.Romancable.ParentObject.DisplayNameOnly+" joins your party!");});
node.AddChoice("rejectgift","I'm sorry but you cannot join me.","Oh I'm sorry. That makes sense.",-30);
return node;
}
}
}