Initial commit (r9)
[18plus-7leafadventure.git] / src / org / sevenchan / dongs / bodyparts / Gender.as
blobb9eb7676b2f270e2c938ad75ff41508ffa39c41d
1 package org.sevenchan.dongs.bodyparts
3 import flash.net.registerClassAlias;
4 /**
5 * ...
6 * @author N3X15
7 */
8 public class Gender
10 registerClassAlias("P_Gender", Gender);
11 // SUBJ OBJ REF POS PP
12 //derp I me myself my mine dick vag
13 public static const MALE:Gender = new Gender("male", "he", "his", "himself", "his", "his", true, false);
14 public static const FEMALE:Gender = new Gender("female", "she", "her", "herself", "her", "hers", false, true);
15 public static const HERM:Gender = new Gender("hermophrodite","shi", "hir", "hirself", "hir", "hirs", true, true); // Might change to its
16 public static const ASEXUAL:Gender = new Gender("asexual", "it", "its", "itself", "its", "its", false, false);
17 public static const YOU:Gender = new Gender("-", "you", "your", "yourself", "your", "your", false, false);
19 public var label:String;
21 /**
22 * He/she/it
24 public var subject:String;
26 /**
27 * Who are we talking about?
29 * Him/her/it (me)
31 public var objective:String;
33 /**
34 * Himself/herself/itself
36 public var reflexive:String;
38 /**
39 * Who owns X?
41 * His/her/its (mine)
43 public var possessive:String;
45 /**
46 * His/hers/its
48 public var possessivePronoun:String;
50 public var hasDick:Boolean;
51 public var hasVag:Boolean;
52 public function Gender(label:String = "", Subject:String = "", Objective:String = "", Reflexive:String = "", Possessive:String = "", PossessivePronoun:String = "", hasDick:Boolean = false , hasVag:Boolean = false )
54 this.label = label;
55 this.subject = Subject;
56 this.objective = Objective;
57 this.reflexive = Reflexive;
58 this.possessive = Possessive;
59 this.possessivePronoun = PossessivePronoun;
60 this.hasDick = hasDick;
61 this.hasVag = hasVag;
64 /**
65 * Replaces %SUB% with subjective gender, %OBJ% with objectives, %REF% with reflexives, %POS% with possessive, and %POSP% with possessive pronouns.
66 * @param _s
67 * @return
69 public function doReplace(_s:String):String {
70 var s:String = _s;
71 s=s.replace(/%SUB%/g, subject);
72 s=s.replace(/%CSUB%/g, subject.substr(0,1).toUpperCase()+subject.substr(1));
73 s=s.replace(/%OBJ%/g, objective);
74 s=s.replace(/%COBJ%/g, objective.substr(0,1).toUpperCase()+objective.substr(1));
75 s=s.replace(/%REF%/g, reflexive);
76 s=s.replace(/%CREF%/g, reflexive.substr(0,1).toUpperCase()+reflexive.substr(1));
77 s=s.replace(/%POS%/g, possessive);
78 s=s.replace(/%CPOS%/g, possessive.substr(0,1).toUpperCase()+possessive.substr(1));
79 s = s.replace(/%PP%/g, possessivePronoun);
80 s=s.replace(/%CPP%/g, possessivePronoun.substr(0,1).toUpperCase()+possessivePronoun.substr(1));
81 return s;