You are on page 1of 5

x_core = "trees"

x_pre1 = ""
x_pre2 = ""
x_pre3 = ""
x_pre4 = ""
x_pre5 = ""
x_pre6 = ""
d_1 = gen_adjectives_bark_C()
d_2 = gen_adjectives_bark_1()
d_3 = gen_adjectives_leaves_C()
d_4 = gen_adjectives_leaves_1()
d_5 = gen_adjectives_tree_shape()
d_6 = gen_adjectives_tree_feel()
d_7 = gen_adjectives_branches_1()
// --d_parts = NewStringDictionary()
dictionary add (d_parts, "1", "shape")
dictionary add (d_parts, "2", "feel")
dictionary add (d_parts, "3", "bark")
dictionary add (d_parts, "4", "leaves")
dictionary add (d_parts, "5", "branches")
// --v_npre = GetRandomInt(1,2)
v_npost = 3 - v_npre
// -+ Begin Core Gen +v_rnd = GetRandomInt(1,4)
v_rk = ToString(v_rnd)
dictionary remove (d_parts, v_rk)
// Core: Shape
if (v_rk = "1") {
x_tmp = func_pick( gen_adjectives_tree_shape() )
x_core = x_tmp + " trees"
}
// Core: Feel
if (v_rk = "2") {
x_tmp = func_pick( gen_adjectives_tree_feel() )
x_core = x_tmp + " trees"
}
// Core: Bark
if (v_rk = "3") {
v_rn2 = GetRandomInt(1,2)
if (v_rn2 = 1) {
x_tmp = func_pick( gen_adjectives_bark_C() )
x_core = x_tmp + " trees"
}
if (v_rn2 = 2) {
x_tmp = func_pick( gen_adjectives_bark_1() )
x_core = x_tmp + "-barked trees"
if ( func_eded(x_tmp)) {
x_tmp = func_pick( gen_adjectives_bark_C() )
x_core = x_tmp + " trees"
}
}
}
// Core: Leaves
if (v_rk = "4") {
v_rn2 = GetRandomInt(1,2)
if (v_rn2 = 1) {
x_tmp = func_pick( gen_adjectives_leaves_C() )
x_core = x_tmp + "-leaved trees"

}
if (v_rn2 = 2) {
x_tmp = func_pick( gen_adjectives_leaves_1() )
x_core = x_tmp + "-leaved trees"
if ( func_eded(x_tmp)) {
x_tmp = func_pick( gen_adjectives_leaves_C() )
x_core = x_tmp + "-leaved trees"
}
}
}
msg ("You see "+x_core)
// -+ Begin Post Gen +v_loop = 1
msg ("DEBUG v_npost = " +ToString(v_npost))
for (v_loop, 1, v_npost, 1) {
v_retry = true
msg ("DEBUG v_loop = " +ToString(v_loop))
while (v_retry = true) {
v_rnd = GetRandomInt(3,5)
v_rk = ToString(v_rnd)
msg ("DEBUG v_rk = " +v_rk)
if ( DictionaryContains (d_parts, v_rk) = true ) {
v_retry = false
msg ("DEBUG v_rk is present, v_retry now false")
}
}
// Post: Bark
if (v_rk = "3") {
dictionary remove (d_parts, v_rk)
v_rn2 = GetRandomInt(1,3)
if (v_rn2 = 1) {
x_tmp = func_pick( gen_adjectives_bark_C() )
if (v_loop = 1) {
x_post = " with " + x_tmp + " bark"
}
else if (v_loop = v_npost) {
x_post = " and " + x_tmp + " bark"
}
else {
x_post = ", " + x_tmp + " bark"
}
}
if (v_rn2 = 2) {
x_tmp = func_pick( gen_adjectives_bark_1() )
if (v_loop = 1) {
x_post = " with " + x_tmp + " bark"
}
else if (v_loop = v_npost) {
x_post = " and " + x_tmp + " bark"
}
else {
x_post = ", " + x_tmp + " bark"
}
}
if (v_rn2 = 3) {
x_tmp = func_pick( gen_adjectives_bark_1() )
x_tm2 = func_pick( gen_adjectives_bark_C() )
if (v_loop = 1) {
x_post = " with " + x_tmp + " " + x_tm2 + " bark"
}

else if (v_loop = v_npost) {


x_post = " and " + x_tmp + " " + x_tm2 + " bark"
}
else {
x_post = ", " + x_tmp + " " + x_tm2 + " bark"
}
}
}
// Post: Leaves
if (v_rk = "4") {
dictionary remove (d_parts, v_rk)
v_rn2 = GetRandomInt(1,3)
if (v_rn2 = 1) {
x_tmp = func_pick( gen_adjectives_leaves_C() )
if (v_loop = 1) {
x_post = " with " + x_tmp + " leaves"
}
else if (v_loop = v_npost) {
x_post = " and " + x_tmp + " leaves"
}
else {
x_post = ", " + x_tmp + " leaves"
}
}
if (v_rn2 = 2) {
x_tmp = func_pick( gen_adjectives_leaves_1() )
if (v_loop = 1) {
x_post = " with " + x_tmp + " leaves"
}
else if (v_loop = v_npost) {
x_post = " and " + x_tmp + " leaves"
}
else {
x_post = ", " + x_tmp + " leaves"
}
}
if (v_rn2 = 3) {
x_tmp = func_pick( gen_adjectives_leaves_1() )
x_tm2 = func_pick( gen_adjectives_leaves_C() )
if (v_loop = 1) {
x_post = " with " + x_tmp + " " + x_tm2 + " leaves"
}
else if (v_loop = v_npost) {
x_post = " and " + x_tmp + " " + x_tm2 + " leaves"
}
else {
x_post = ", " + x_tmp + " " + x_tm2 + " leaves"
}
}
}
// Post: Branches
if (v_rk = "5") {
dictionary remove (d_parts, v_rk)
x_tmp = func_pick( gen_adjectives_branches_1() )
if (v_loop = 1) {
x_post = " with " + x_tmp + " branches"
}
else if (v_loop = v_npost) {
x_post = " and " + x_tmp + " branches"
}

else {
x_post = ", " + x_tmp + " branches"
}
}
x_core = x_core + x_post
}
msg ("You see "+x_core)
//--// -+ Begin Pre Gen +v_loop = 1
msg ("DEBUG v_npre = " +ToString(v_npre))
for (v_loop, 1, v_npre, 1) {
v_retry = true
msg ("DEBUG v_loop = " +ToString(v_loop))
while (v_retry = true) {
v_rnd = GetRandomInt(1,4)
v_rk = ToString(v_rnd)
msg ("DEBUG v_rk = " +v_rk)
if ( DictionaryContains (d_parts, v_rk) = true ) {
v_retry = false
msg ("DEBUG v_rk is present, v_retry now false")
}
}
// Pre: Bark
if (v_rk = "3") {
dictionary remove (d_parts, v_rk)
v_rn2 = GetRandomInt(1,2)
if (v_rn2 = 1) {
x_tmp = func_pick( gen_adjectives_bark_C() )
if (v_loop = 1) {
x_pre = x_tmp + "-barked, "
}
else {
x_pre = x_tmp + "-barked, "
}
}
if (v_rn2 = 2) {
x_tmp = func_pick( gen_adjectives_bark_1() )
if (v_loop = 1) {
x_pre = x_tmp + "-barked, "
}
else {
x_pre = x_tmp + "-barked, "
}
}
}
// Pre: Leaves
if (v_rk = "4") {
dictionary remove (d_parts, v_rk)
v_rn2 = GetRandomInt(1,2)
if (v_rn2 = 1) {
x_tmp = func_pick( gen_adjectives_leaves_C() )
if (v_loop = 1) {
x_pre = x_tmp + "-leaved, "
}
else {
x_pre = x_tmp + "-leaved, "
}
}
if (v_rn2 = 2) {

x_tmp = func_pick( gen_adjectives_leaves_1() )


if (v_loop = 1) {
x_pre = x_tmp + "-leaved, "
}
else {
x_pre = x_tmp + "-leaved, "
}
}
}
// Pre: Shape
if (v_rk = "1") {
dictionary remove (d_parts, v_rk)
x_tmp = func_pick( gen_adjectives_tree_shape() )
if (v_loop = 1) {
x_pre = x_tmp + ", "
}
else {
x_pre = x_tmp + ", "
}
}
// Pre: Feel
if (v_rk = "2") {
dictionary remove (d_parts, v_rk)
x_tmp = func_pick( gen_adjectives_tree_feel() )
if (v_loop = 1) {
x_pre = x_tmp + ", "
}
else {
x_pre = x_tmp + ", "
}
}
x_core = x_pre + " " + x_core
}
msg ("You see "+x_core)

You might also like