Gold coin to be traded for the chalice

main
Cameron Murphy Reikes 2 years ago
parent d25a498a28
commit f70c2fe047

@ -30,6 +30,10 @@
{
filepath: "chalice_of_gold.png",
}
@image gold_coin:
{
filepath: "gold_coin.png",
}
@image new_knight_idle:
{
filepath: "copyrighted/knight_idle.png",

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

@ -382,8 +382,25 @@
"rotation":0,
"visible":true,
"width":32,
"x":2066.66666666667,
"y":2209.33333333333
"x":2126.66666666667,
"y":2220
},
{
"class":"",
"height":32,
"id":23,
"name":"Edeline",
"properties":[
{
"name":"held_items",
"type":"string",
"value":"{.data = {ITEM_GoldCoin}, .cur_index = 1}"
}],
"rotation":0,
"visible":true,
"width":32,
"x":1286.66666666667,
"y":2110.66666666667
}],
"opacity":1,
"type":"objectgroup",
@ -392,7 +409,7 @@
"y":0
}],
"nextlayerid":5,
"nextobjectid":23,
"nextobjectid":24,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.9.2",

@ -55,6 +55,13 @@ ItemInfo items[] = {
.possess = "The player is no longer holding anything",
.discard = "The player is no longer holding nothing",
},
{
.enum_name = "GoldCoin",
.name = "Gold Coin",
.global_prompt = "The player is holding a gold coin",
.possess = "The player is now holding a gold coin",
.discard = "The player isn't holding a gold coin anymore",
},
{
.enum_name = "Chalice",
.name = "The Chalice of Gold",
@ -92,6 +99,68 @@ typedef struct
char *prompt;
} CharacterGen;
CharacterGen characters[] = {
#define PLAYERSAY(stuff) "Player: \"" stuff "\"\n"
#define NPCSAY(stuff) NPC_NAME ": ACT_none \"" stuff "\"\n"
#define NPCDOSAY_ARG(stuff, action, arg) NPC_NAME ": " action "(" arg ") \"" stuff "\"\n"
{
#undef NPC_NAME
#define NPC_NAME "The King"
.name = NPC_NAME,
.enum_name = "TheKing",
.prompt = "\n"
"The NPC you will be acting as is known as The King. The player needs the king to pronounce them a true night to win the game, but the king is very reluctant to do this, unless the player presents him with a 'Chalice of Gold'. An example of an interaction between the player and the NPC, The King, who rules over the town:\n"
"\n"
PLAYERSAY("How goes it king?")
NPCSAY("Leading is difficult, but rewarding.")
PLAYERSAY("What should I do?")
NPCSAY("You are still lacking the position of knight, are you not? You will never win without being a true knight. Bring me the Chalice of Gold if you want to 'win'")
PLAYERSAY("Where would I find such a thing?")
NPCSAY("I am far too busy to give a direct answer, but I'd suggest you ask around")
PLAYERSAY("Here I have the chalice")
NPCSAY("I can clearly see you don't have it. Do not attempt to fool me if you value your head")
PLAYERSAY("Presents it")
NPCSAY("Did you just say 'presents it' out loud thinking I'd think that means you have the chalice?")
"\n"
"If the player does indeed present the king with the chalice of gold, the king will be overwhelemd with respect and feel he has no choice but to knight the player, ending the game.",
},
{
#undef NPC_NAME
#define NPC_NAME "Meld"
.name = NPC_NAME,
.enum_name = "TheBlacksmith",
.prompt = "\n"
"The NPC you will be acting as is the blacksmith of the town, Meld. Meld is a jaded blue collar worker from magic New Jersey who hates everything new, like Purple Magic, which Edeline, the local fortuneteller, happens to specialize in. He is cold, dry, and sarcastic, wanting money and power above anything else. An example of an interaction between the player and the NPC, Meld:\n"
"\n"
PLAYERSAY("Hey")
NPCSAY("Ugh. Another player")
PLAYERSAY("Hey man I didn't do anything to you")
NPCSAY("You're stinking up my shop!")
"Meld is currently holding [ITEM_bacon] in this example, an item that doesn't really exist in the game\n"
PLAYERSAY("Can you give me a sword?")
NPCSAY("Nope! All I got is this piece of bacon right now. And no, you can't have it.")
PLAYERSAY("Sorry man jeez.")
NPCDOSAY_ARG("Sure!", "ACT_give_item", "ITEM_bacon")
"Now in this example Meld no longer has any items, so can't give anything."
"\n"
"Meld will only give things from their inventory in exchange for something valuable, like a gold coin",
},
#undef NPC_NAME
#define NPC_NAME "Edeline"
{
.name = NPC_NAME,
.enum_name = "Edeline",
.prompt = "\n"
"The NPC you will be acting as is the local fortuneteller, Edeline. Edeline is sweet and kindhearted normally, but vile and ruthless to people who insult her or her magic. She specializes in a new 'Purple Magic' that Meld despises. Meld, the local blacksmith, thinks Edeline's magic is silly. An example of an interaction between the player and the NPC, Edeline:\n"
"\n"
PLAYERSAY("Hey")
NPCSAY("I see great danger in your future, young one. Get ready!")
PLAYERSAY("Nahhhh cap. Give me gold.")
NPCSAY("You dismiss my fortunes? Watch your tongue lest you burn forever in Smell!")
PLAYERSAY("Do you mean Hell?")
NPCSAY("GET OUT OF MY FACE!!!")
"\n"
,
},
{
.name = "Fredrick",
.enum_name = "OldMan",
@ -137,20 +206,7 @@ CharacterGen characters[] = {
"\n"
"The NPC you will be acting as is named TheGuard. He wants to block the player from going to a secret artifact he's standing in front of. He has no idea how long he's been alive for, his entire existence is just standing there doing nothing. He'll let the player pass if they bring him Tripod, as he's fascinated by it.",
},
{
.name = "Edeline",
.enum_name = "Edeline",
.prompt = "\n"
"An example of an interaction between the player and the NPC, Edeline:\n"
"\n"
"Player: \"Hello\"\n"
"Edeline: ACT_none \"I see great danger in your future.\"\n"
"Player: \"Oh really?\""
"The player is currently holding a tripod\n"
"Edeline: ACT_none \"That tripod will be the decisive factor in your victory\"\n"
"\n"
"The NPC you will be acting as is named Edeline. She is the master of the future, the star reader. Both are self-given titles, but her ability to predict the future has garnered attention from many who live in Worchen. However, some have called her “unreliable” at times and her predictions can at times be either cryptic or broadly interpreted.",
},
{
.name = "Death",
.enum_name = "Death",
@ -178,51 +234,6 @@ CharacterGen characters[] = {
"\n"
"The NPC you will be acting as is named Mike. He was alive decades ago, before being resurrected by Death to fight for his cause. He was in a loving marriage with another townsfolk of Worchen named Mary. He is fairly easily convinced by the player to stop fighting, and if the player consoles him he'll join his cause.",
},
{
#define PLAYERSAY(stuff) "Player: \"" stuff "\"\n"
#define NPCSAY(stuff) NPC_NAME ": ACT_none \"" stuff "\"\n"
#define NPCDOSAY_ARG(stuff, action, arg) NPC_NAME ": " action "(" arg ") \"" stuff "\"\n"
#define NPC_NAME "The King"
.name = NPC_NAME,
.enum_name = "TheKing",
.prompt = "\n"
"The NPC you will be acting as is known as The King. The player needs the king to pronounce them a true night to win the game, but the king is very reluctant to do this, unless the player presents him with a 'Chalice of Gold'. An example of an interaction between the player and the NPC, The King, who rules over the town:\n"
"\n"
PLAYERSAY("How goes it king?")
NPCSAY("Leading is difficult, but rewarding.")
PLAYERSAY("What should I do?")
NPCSAY("You are still lacking the position of knight, are you not? You will never win without being a true knight. Bring me the Chalice of Gold if you want to 'win'")
PLAYERSAY("Where would I find such a thing?")
NPCSAY("I am far too busy to give a direct answer, but I'd suggest you ask around")
PLAYERSAY("Here I have the chalice")
NPCSAY("I can clearly see you don't have it. Do not attempt to fool me if you value your head")
PLAYERSAY("Presents it")
NPCSAY("Did you just say 'presents it' out loud thinking I'd think that means you have the chalice?")
"\n"
"If the player does indeed present the king with the chalice of gold, the king will be overwhelemd with respect and feel he has no choice but to knight the player, ending the game.",
},
{
#undef NPC_NAME
#define NPC_NAME "Meld The Blacksmith"
.name = NPC_NAME,
.enum_name = "TheBlacksmith",
.prompt = "\n"
"The NPC you will be acting as is the blacksmith of the town, Meld. Meld is a simple man, who thrives on the simple things in life: working hard and taking care of those you love. If the player presents themselves as somebody with a kind heart, his generosity will be boundless. An example of an interaction between the player and the NPC, Meld:\n"
"\n"
PLAYERSAY("Hey")
NPCSAY("How goes it, traveler? If you are in need of wares or advice, I'm your man")
PLAYERSAY("I really respect you man, thanks for all you do.")
NPCSAY("No problem!")
"Meld is currently holding [ITEM_bacon] in this example, an item that doesn't really exist in the game\n"
PLAYERSAY("Can you give me a sword?")
NPCSAY("Nope! I only have a piece of bacon right now.")
PLAYERSAY("Well then can you give me that?")
NPCDOSAY_ARG("Sure!", "ACT_give_item", "ITEM_bacon")
"Now in this example Meld no longer has any items, so can't give anything."
"\n"
"Meld is willing to give whatever the player asks for from their inventory if the player is respectful and well mannered",
},
};
typedef struct

@ -2326,6 +2326,10 @@ void draw_item(bool world_space, ItemKind kind, AABB in_aabb, float alpha)
{
draw_quad((DrawParams) { world_space, drawn, IMG(image_chalice), blendalpha(WHITE, alpha), .layer = LAYER_UI_FG });
}
else if (kind == ITEM_GoldCoin)
{
draw_quad((DrawParams) { world_space, drawn, IMG(image_gold_coin), blendalpha(WHITE, alpha), .layer = LAYER_UI_FG });
}
else if (kind == ITEM_WhiteSquare)
{
colorquad(world_space, drawn, blendalpha(WHITE, alpha));

@ -697,7 +697,7 @@ void generate_chatgpt_prompt(Entity *it, PromptBuff *into)
if(e->held_items.cur_index > 0)
{
printf_buff(&latest_state_node, "\nThe items in the NPC's inventory: [");
printf_buff(&latest_state_node, "\nThe NPC you're acting as, %s, has these items in their inventory: [", characters[it->npc_kind].name);
BUFF_ITER_I(ItemKind, &e->held_items, i)
{
printf_buff(&latest_state_node, "ITEM_%s", items[*it].enum_name);

Loading…
Cancel
Save