-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEndFriendshipAction.java
More file actions
40 lines (30 loc) · 1.47 KB
/
Copy pathEndFriendshipAction.java
File metadata and controls
40 lines (30 loc) · 1.47 KB
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
package actions;
import storyelements.Location;
import storyelements.StoryCharacter;
import storygenerator.WorldProperty;
import storygenerator.WorldProperty.PropertyKey;
/**
*
* @author etienne
*/
public class EndFriendshipAction extends Action {
public EndFriendshipAction(StoryCharacter pChar, StoryCharacter pOther, Location pLoc) {
super();
//Text to be displayed when the action is performed in the story
aNarrativeForm = "The " + pChar + " and the " + pOther + " talked with each"
+ " other and found that they are no longer very close.";
//Facts that need to be TRUE to fire the action
aPreTrue.add(new WorldProperty(pChar, PropertyKey.IS_AT_LOCATION, pLoc));
aPreTrue.add(new WorldProperty(pOther, PropertyKey.IS_AT_LOCATION, pLoc, true));
aPreTrue.add(new WorldProperty(pChar, PropertyKey.LOVES, pOther));
aPreTrue.add(new WorldProperty(pOther, PropertyKey.LOVES, pChar));
//Facts that need to be FALSE to fire the action
aPreFalse.add(new WorldProperty(pOther, PropertyKey.IS_DEAD, true));
aPreFalse.add(new WorldProperty(pOther, PropertyKey.IS_CAPTIVE));
//Facts that BECOME TRUE as a result
//none
//Facts that BECOME FALSE as a result
aPostFalse.add(new WorldProperty(pChar, PropertyKey.LOVES, pOther));
aPostFalse.add(new WorldProperty(pOther, PropertyKey.LOVES, pChar));
}
}