|
@@ -37,6 +37,14 @@ class Say {
|
|
|
|
|
|
private centered : boolean = false;
|
|
|
|
|
|
+ public static Action (a : any) {
|
|
|
+ return new SayAction(a);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static Bold (a : any) {
|
|
|
+ return new SayBold(a);
|
|
|
+ }
|
|
|
+
|
|
|
public static Mention (target : Thing, uppercase = true) : Array<any> {
|
|
|
if (target == WorldState.player) {
|
|
|
return [new SayYou(uppercase)];
|
|
@@ -57,6 +65,48 @@ class Say {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public Article (target : Thing, uppercase = true) {
|
|
|
+ let arr = [];
|
|
|
+ if (target.isUnique()) {
|
|
|
+ arr.push(new SayThe(uppercase));
|
|
|
+ } else {
|
|
|
+ arr.push(new SayAn(uppercase));
|
|
|
+ }
|
|
|
+ arr.push(target);
|
|
|
+ return arr;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * He, She, It
|
|
|
+ * @param target
|
|
|
+ * @param uppercase
|
|
|
+ * @constructor
|
|
|
+ */
|
|
|
+ public Subject (target : Thing, uppercase = true) {
|
|
|
+ return new SayHeSheIt(target, uppercase);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Him, Her, It
|
|
|
+ * @param target
|
|
|
+ * @param uppercase
|
|
|
+ * @constructor
|
|
|
+ */
|
|
|
+ public Object (target : Thing, uppercase = true) {
|
|
|
+ return new SayHimHerIt(target, uppercase);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * His, Hers, Its
|
|
|
+ * @param target
|
|
|
+ * @param uppercase
|
|
|
+ * @constructor
|
|
|
+ */
|
|
|
+ public Possessive (target : Thing, uppercase = true) {
|
|
|
+ return new SayHisHersIts(target, uppercase);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
public static Speak (speaker : Thing | string, ...message : Array<any>) {
|
|
|
if (typeof speaker == "string") {
|
|
|
return [new SayBold(speaker, ": "), ...message];
|