MICHAEL SUN

Generative AI Intro​
In the following sequences that will occur, there will be three projects that I did in my Generative AI class. The first one is the RPG, the second one is the cashier, it is a modifier of a person going into a shop. The final one is a game where you get sniper gun and you choose the following scenes.
Description of the 1st Game
​
The first game is the RPG Game, and this is a code sample of the foundation. What it does is list the characters of the game and lists each of the characters’ damage, abilities, weaknesses. It gives the player the consideration to choose which character do they want to play.
​Project No. 1 Code Sample
import random
def set_special_power(char_class):
if char_class == "ranger":
return {"name": "Arrow Rain", "mana_cost": 10, "damage": 25, "dodge_chance": 0.5}
elif char_class == "knight":
return {"name": "Shield Bash", "mana_cost": 10, "damage": 20, "dodge_chance": 0.5}
elif char_class == "cleric":
return {"name": "Holy Light", "mana_cost": 10, "heal": 30, "dodge_chance": 0.5}
elif char_class == "monk":
return {"name": "Fist of Fury", "mana_cost": 10, "damage": 30, "dodge_chance": 0.5}
else:
return {"name": "Basic Attack", "mana_cost": 0, "damage": 5, "dodge_chance": 0.5}
def create_enemy():
enemy_list = [
("Slime", 30, 5, 0.5),
("Dragon", 100, 15, 0.5),
("Skeleton", 50, 10, 0.5),
("Bandit", 40, 15, 0.5)
]
​Description of the Option Scene Project
The Second Game is the option scenes game. This is a sample of the code. It is the 1st option of the game. Either you assassinate Vladimir Putin with a sniper gun or you go to the FBI Police station with the gun.




Sample of the Cashier Project
The Final project is the Cashier Project, where it modifies a person buying products in a clothing store or a shopping mall. Here is a sample of the foundation of the code in modifying the store.