-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEquipWeaponAction.java
More file actions
36 lines (26 loc) · 1.09 KB
/
Copy pathEquipWeaponAction.java
File metadata and controls
36 lines (26 loc) · 1.09 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
package actions;
import storyelements.StoryCharacter;
import storyelements.Weapon;
import storygenerator.WorldProperty;
import storygenerator.WorldProperty.PropertyKey;
/**
*
* @author etienne
*/
public class EquipWeaponAction extends Action {
public EquipWeaponAction(StoryCharacter pChar, Weapon pWeapon) {
super();
//Text to be displayed when the action is performed in the story
aNarrativeForm = "The " + pChar + " equipped " + pChar.getPossessivePronoun() +
" " + pWeapon + ".";
//Facts that need to be TRUE to fire the action
aPreTrue.add(new WorldProperty(pChar, PropertyKey.OWNS, pWeapon));
//Facts that need to be FALSE to fire the action
aPreFalse.add(new WorldProperty(pChar, PropertyKey.IS_ARMED));
//Facts that BECOME TRUE as a result
aPostTrue.add(new WorldProperty(pChar, PropertyKey.HAS_EQUIPPED, pWeapon));
aPostTrue.add(new WorldProperty(pChar, PropertyKey.IS_ARMED));
//Facts that BECOME FALSE as a result
//none
}
}