package com.lucasdnd.ags.gameplay.actions; import com.lucasdnd.ags.gameplay.Customer; import com.lucasdnd.ags.gameplay.market.MarketGame; public class BuyGameAction extends Action { protected MarketGame referringMarketGame; public BuyGameAction(MarketGame referringMarketGame) { // Reference to the Market Game it wants to play this.referringMarketGame = referringMarketGame; // The Character State related to renting a game state = Customer.WANTS_TO_BUY; // The action ratings actionRating = 0; positiveActionPoints = 7; negativeActionPoints = -3; // Creates the speeches neutralTalks = new String[3]; neutralTalks[0] = "I want to buy a game"; neutralTalks[1] = "Let's see what they're selling"; neutralTalks[2] = "I'm buying a game today!"; positiveTalks = new String[2]; positiveTalks[0] = "I'll buy this " + referringMarketGame.getName() + " today"; positiveTalks[1] = "I wanna buy a " + referringMarketGame.getName(); negativeTalks = new String[2]; negativeTalks[0] = "Too bad they don't have " + referringMarketGame.getName(); negativeTalks[1] = "I wish they had " + referringMarketGame.getName(); } public MarketGame getReferringMarketGame() { return referringMarketGame; } public void setReferringMarketGame(MarketGame referringMarketGame) { this.referringMarketGame = referringMarketGame; } }