async def trade(self, ctx, team, *args): """ Begins a trade with <team>, where you offer item1 quantity1 item2 quantity2 and so on. For example: !trade team_name Fish 10 "Gold coin" 3 """ await perform_async(arrange_trade, ctx, get_team(ctx.channel), team, list(args))
async def upgrade(self, ctx, amount: int): """ (CONTROL) Upgrades this team's reactor by <amount>. You can specify a negative number, but this will not check that the resulting state makes sense (that is, the team is not using more power than they have) - in general you should use !damage instead. """ await perform_async_unsafe(upgrade_sub, ctx, get_team(ctx.channel), amount)
async def pay(self, ctx, amount: int): """ (CONTROL) Pays this team <amount> money. Shorthand for !give with currency name. """ await perform_async_unsafe(give_item_to_team, ctx, get_team(ctx.channel), CURRENCY_NAME, amount)
async def deactivate(self, ctx): """ Deactivates your submarine, stopping it from moving and performing actions. Needed for docking. """ await perform_async(set_activation, ctx, get_team(ctx.channel), ctx.guild, False)
async def broadcast(self, ctx, *message): """ Broadcasts a <message> to all in range. Requires the sub to be activated. Note that this can be provided in quotes or not - we consume all arguments. """ await perform_async(broadcast, ctx, get_team(ctx.channel), " ".join(message))
async def get_paid(self, ctx, amount: int): """ (CONTROL) Get paid by this team <amount> money. Shorthand for !take with currency name. Do not use this during a trade. """ await perform_async_unsafe(take_item_from_team, ctx, get_team(ctx.channel), CURRENCY_NAME, amount)
async def upgrade_innate(self, ctx, system, amount: int): """ (CONTROL) Upgrades this team's innate system by <amount>. You can specify a negative number to downgrade, and it will check that this makes sense. """ await perform_async_unsafe(upgrade_sub_innate, ctx, get_team(ctx.channel), system, amount)
async def power(self, ctx, *systems): """ Gives one power to all of <systems> (any number of systems, can repeat). Fails if this would overload the power. NOTE: This is cumulative - it acts based on all previous calls to this (before the game tick). """ await perform(power_systems, ctx, get_team(ctx.channel), list(systems))
async def puzzle(self, ctx): """ Gives you a puzzle, which must be solved before you next move. If you already have a puzzle in progress, it will be treated as if you ran out of time! """ await perform_async(give_team_puzzle, ctx, get_team(ctx.channel), "repair")
async def unpower(self, ctx, *systems): """ Removes one power from all of <systems> (any number of systems, can repeat). Fails if a system would have less than zero power. NOTE: This is cumulative - it acts based on all previous calls to this (before the game tick). """ await perform(unpower_systems, ctx, get_team(ctx.channel), list(systems))
async def add_keyword(self, ctx, keyword, turn_limit: Optional[int] = None, damage: int = 1): """ (CONTROL) Gives this team a brand new <keyword>! (This is for upgrades outside of power.) """ await perform_async_unsafe(add_keyword_to_sub, ctx, get_team(ctx.channel), keyword, turn_limit, damage)
async def take(self, ctx, item, quantity: int = 1): """ (CONTROL) Take <quantity> of <item> away from this team. Do not use this during a trade. """ await perform_async_unsafe(take_item_from_team, ctx, get_team(ctx.channel), item, quantity)
async def activate(self, ctx): """ Activates your submarine, allowing it to move and do actions in real-time. """ await perform_async(set_activation, ctx, get_team(ctx.channel), ctx.guild, True)
async def give(self, ctx, item, quantity: int = 1): """ (CONTROL) Gives this team an <item> with optional <quantity>. """ await perform_async_unsafe(give_item_to_team, ctx, get_team(ctx.channel), item, quantity)
async def interact(self, ctx, arg=None): """ Some NPCs will ask you to call this. """ await perform_async(sub_interacts, ctx, get_team(ctx.channel), arg)
async def reject_trade(self, ctx): """ Rejects and ends the current trade. """ await perform_async(reject_offer, ctx, get_team(ctx.channel))
async def crane(self, ctx): """ Drops the crane in your current location. Takes two turns to resolve. """ await perform(drop_crane, ctx, get_team(ctx.channel))
async def status(self, ctx): """ Reports the status of the submarine, including power and direction. """ await perform(get_status, ctx, get_team(ctx.channel), main_loop)
async def exit_sub(self, ctx): """ Allows crew to leave a sub. Call only while you are docked. """ await perform_async(exit_submarine, ctx, get_team(ctx.channel), ctx.guild)
async def drop(self, ctx, item): """ Drops the item specified by <item>. You cannot drop key items (those ending in *). """ await perform(drop_item, ctx, get_team(ctx.channel), item)
async def heal(self, ctx, amount: int, reason=""): """ (CONTROL) Forces this team to take <amount> healing at next loop. You can optionally specify a <reason> which will be messaged to them before. """ await perform_async(heal_up, ctx, get_team(ctx.channel), amount, reason)
async def death(self, ctx, subname): """ Kills your submarine. This isn't a joke. Must be called with your submarine's full name. """ await perform_async(kill_sub, ctx, get_team(ctx.channel), subname)
async def broadcast(self, ctx, message): """ Broadcasts a <message> to all in range. Requires the sub to be activated. """ await perform_async(broadcast, ctx, get_team(ctx.channel), message)
async def shoot_stunning(self, ctx, x: int, y: int): """ Schedules a nondamaging shot at (<x>, <y>). This uses two weapons charges. """ await perform(schedule_shot, ctx, x, y, get_team(ctx.channel), False)
async def add_npc(self, ctx, npctype, x: int, y: int): """ (CONTROL) Add an NPC <npcname> of <npctype> to the map at (<x>, <y>). """ await perform_unsafe(add_npc_to_map, ctx, npctype, x, y, get_team(ctx.channel))
async def offer(self, ctx, *args): """ Makes a counteroffer in your current trade, of form item1 quantity1 item2 quantity2... For example: !offer Fish 10 "Gold coin" 4 """ await perform_async(make_offer, ctx, get_team(ctx.channel), list(args))
async def map(self, ctx): """ Shows a map of the world, including your submarine! """ await perform_async(print_map, ctx, get_team(ctx.channel))
async def accept_trade(self, ctx): """ Accepts the current trade. A trade will only complete once both parties have accepted the trade. """ await perform_async(accept_offer, ctx, get_team(ctx.channel))
async def scan(self, ctx): """ Repeats the scan message sent at the start of the current tick. """ await perform(get_scan, ctx, get_team(ctx.channel))
async def control_message(self, ctx, message): """ (CONTROL) Sends to this team the message <message>, regardless of distance. """ await perform_async_unsafe(shout_at_team, ctx, get_team(ctx.channel), message)