MGME - Mythic Game Master Emulator
Publicado por Xerxes (última atualização em 18/04/2017)
[ Hits: 3.310 ]
Homepage: -
MGME - Mythic Game Master Emulator
Este script pode parecer confuso, e é!
Foi criado para uso pessoal.
Mas pode servir de ajuda para usuários de RPG de mesa que conhecem o Mythic Game Master Emulator.
O MGME, em poucas palavras, emula um Mestre de Jogo em uma sessão de RPG. Sim, é isso mesmo!
Porém o uso do script só pode ser compreendido por aqueles que já leram o livro disponível em:
http://paizo.com/products/btpy7w0o?Mythic-Game-Master-Emulator
Os comandos são: (r)olar, (c)ena, (e)vento, +c, -c, p[0-10]
Para encerrar basta usar Ctrl+x.
#!/bin/bash
#
# mgme.sh
#
# Mythic Game Master Emulator (v1.0b)
#
#
# Este script pode parecer confuso, e é!
#
# Foi criado para uso pessoal.
#
# Mas pode servir de ajuda para usuários de RPG de mesa que conhecem o
# Mythic Game Master Emulator.
#
# O MGME, em poucas palavras, emula um Mestre de Jogo. Sim, é isso mesmo!
#
# Porém o uso do script só pode ser compreendido por aqueles que já leram
# o livro MGME disponível em:
# http://paizo.com/products/btpy7w0o?Mythic-Game-Master-Emulator
#
# Os comandos são: (r)olar, (c)ena, (e)vento, +c, -c, p[0-10]
#
# Para encerrar basta usar Ctrl+x.
#
# by Xerxes Lins (www.vivaolinux.com.br/~xerxeslins)
#
########################################################################
#D10
function _d10 {
RESULT=$(( ( RANDOM % 10 ) + 1 ))
}
#D100
function _d100 {
RESULT=$(( ( RANDOM % 100 ) + 1 ))
}
#Fator de caos
CHAOS_FACTOR=5
#Probabilidade
ODDS=4
function _odds_description () {
if [ $ODDS = 0 ]; then ODDS_DESC="impossível"; fi
if [ $ODDS = 1 ]; then ODDS_DESC="sem chance"; fi
if [ $ODDS = 2 ]; then ODDS_DESC="muito improvável"; fi
if [ $ODDS = 3 ]; then ODDS_DESC="improvável"; fi
if [ $ODDS = 4 ]; then ODDS_DESC="50/50"; fi
if [ $ODDS = 5 ]; then ODDS_DESC="pouco provável"; fi
if [ $ODDS = 6 ]; then ODDS_DESC="provável"; fi
if [ $ODDS = 7 ]; then ODDS_DESC="muito provável"; fi
if [ $ODDS = 8 ]; then ODDS_DESC="quase certo"; fi
if [ $ODDS = 9 ]; then ODDS_DESC="certamente"; fi
if [ $ODDS = 10 ]; then ODDS_DESC="tem que ser"; fi
}
#Impossível
ODDS_CHECK_00=("50" "25" "15" "10" "5" "5" "0" "0" "-20")
#Sem chance
ODDS_CHECK_01=("75" "50" "35" "25" "15" "10" "5" "5" "0")
#Muito improvável
ODDS_CHECK_02=("85" "65" "50" "45" "25" "15" "10" "5" "5")
#Improvável
ODDS_CHECK_03=("90" "75" "55" "50" "35" "20" "15" "10" "5")
#50/50
ODDS_CHECK_04=("95" "85" "75" "65" "50" "35" "25" "15" "10")
#Pouco provável
ODDS_CHECK_05=("95" "90" "85" "80" "65" "50" "45" "25" "20")
#Provável
ODDS_CHECK_06=("100" "95" "90" "85" "75" "55" "50" "35" "25")
#Muito provável
ODDS_CHECK_07=("105" "95" "95" "90" "85" "75" "65" "50" "45")
#Quase certo
ODDS_CHECK_08=("115" "100" "95" "95" "90" "80" "75" "55" "50")
#Certamente
ODDS_CHECK_09=("125" "110" "95" "95" "90" "85" "80" "65" "55")
#Tem que ser
ODDS_CHECK_10=("145" "130" "100" "100" "95" "95" "90" "85" "80")
ACTION=( "realização" "começo" "negligênciar" "luta" "recrutar" "triunfo" "violação" "oposição" "malícia" "comunicar" "perseguir" "aumentar" "diminuir" "abandonar" "gratificar" "inquirir" "hostilizar" "mover" "resíduos" "trégua"
"libertação" "ser amigo(a)" "julgar" "desertar" "dominar" "procrastinar" "louvar" "separar" "pegar" "quebrar" "curar" "adiar" "parar" "mentir" "retornar" "imitar" "contorcer-se" "informar" "conceder" "adiar"
"expor" "regatear" "aprisionar" "libertação" "comemorar" "desenvolver" "viajar" "bloquear" "ofender" "rebaixar" "exagerar" "adiar" "adversidade" "matar" "interromper" "usurpar" "criar" "trair" "concordar" "abuso"
"oprimir" "inspeção" "emboscada" "espiar" "anexar" "transportar" "abrir" "descuido" "ruína" "extravagância" "truque" "chegar" "proposta" "dividir" "recusar" "desconfiança" "enganar" "crueldade" "intolerância" "confiança"
"emoção" "atividade" "auxiliar" "cuidado" "negligência" "paixão" "trabalho duro" "controle" "atração" "fracasso" "perseguir" "vingança" "procedimento" "disputa" "punição" "guiar" "transformar" "derrubar" "oprimir" "alterar"
)
SUBJECT=( "objetivos" "sonhos" "ambiente" "fora" "dentro" "realidade" "aliados" "inimigos" "mal" "bom" "emoções" "oposição" "guerra" "paz" "o(s) inocente(s)" "amor" "o espiritual" "o intelectual" "novas ideias" "alegria"
"mensagens" "energia" "equilíbrio" "tensão" "amizade" "o físico" "um projeto" "prazeres" "dor" "posses" "benefícios" "planos" "falsidade" "expectativas" "questões legais" "burocracia" "negócios" "um plano" "notícias" "fatores externos"
"conselhos" "um enredo" "competição" "prisão" "doença" "comida" "atenção" "sucesso" "fracasso" "viagem" "ciúme" "disputa" "casa" "investimento" "sofrimento" "desejos" "táticas" "impasse" "aleatoriedade" "infortúnio"
"morte" "perturbação" "poder" "um fardo" "intrigas" "medos" "emboscada" "boato" "feridas" "extravagância" "representante" "adversidades" "opulência" "liberdade" "militar" "mundano" "ensaios" "massas" "veículo" "arte"
"vitória" "disputa" "riquezas" "status quo" "tecnologia" "esperança" "magia" "ilusões" "portais" "perigo" "armas" "animais" "tempo" "elementos" "natureza" "público" "liderança" "fama" "raiva" "informações"
)
function _event_focus () {
_d100
if [ $RESULT -gt 0 ] && [ $RESULT -lt 8 ]; then FOCUS="Evento remoto"; fi
if [ $RESULT -gt 7 ] && [ $RESULT -lt 29 ]; then FOCUS="NPC age"; fi
if [ $RESULT -gt 28 ] && [ $RESULT -lt 36 ]; then FOCUS="Introduz um novo NPC"; fi
if [ $RESULT -gt 35 ] && [ $RESULT -lt 46 ]; then FOCUS="Se aproxima do objetivo"; fi
if [ $RESULT -gt 45 ] && [ $RESULT -lt 53 ]; then FOCUS="Se afasta do objetivo"; fi
if [ $RESULT -gt 52 ] && [ $RESULT -lt 56 ]; then FOCUS="Conclui o objetivo"; fi
if [ $RESULT -gt 55 ] && [ $RESULT -lt 68 ]; then FOCUS="Deu ruim para PC"; fi
if [ $RESULT -gt 67 ] && [ $RESULT -lt 76 ]; then FOCUS="Deu bom para PC"; fi
if [ $RESULT -gt 75 ] && [ $RESULT -lt 84 ]; then FOCUS="Evento ambiguo"; fi
if [ $RESULT -gt 83 ] && [ $RESULT -lt 93 ]; then FOCUS="Deu ruim para NPC"; fi
if [ $RESULT -gt 92 ] && [ $RESULT -lt 101 ]; then FOCUS="Deu bom para NPC"; fi
}
function _event () {
_event_focus
_d100
ACTION=${ACTION[$RESULT]}
_d100
SUBJECT=${SUBJECT[$RESULT]}
ANSWER="$FOCUS ($ACTION - $SUBJECT)"
}
function _scene () {
_d10
if [ $RESULT -gt $CHAOS_FACTOR ]; then ANSWER="A cena não sofre alterações"
else
if [ $(($RESULT % 2)) -eq 0 ];
then
ANSWER="A cena é alterada"
else
ANSWER="A cena é interrompida"
fi
fi
}
function _determina_probabilidade () {
if [ $ODDS -eq 0 ]; then ODDS_ARRAY=("${ODDS_CHECK_00[@]}"); fi
if [ $ODDS -eq 1 ]; then ODDS_ARRAY=("${ODDS_CHECK_01[@]}"); fi
if [ $ODDS -eq 2 ]; then ODDS_ARRAY=("${ODDS_CHECK_02[@]}"); fi
if [ $ODDS -eq 3 ]; then ODDS_ARRAY=("${ODDS_CHECK_03[@]}"); fi
if [ $ODDS -eq 4 ]; then ODDS_ARRAY=("${ODDS_CHECK_04[@]}"); fi
if [ $ODDS -eq 5 ]; then ODDS_ARRAY=("${ODDS_CHECK_05[@]}"); fi
if [ $ODDS -eq 6 ]; then ODDS_ARRAY=("${ODDS_CHECK_06[@]}"); fi
if [ $ODDS -eq 7 ]; then ODDS_ARRAY=("${ODDS_CHECK_07[@]}"); fi
if [ $ODDS -eq 8 ]; then ODDS_ARRAY=("${ODDS_CHECK_08[@]}"); fi
if [ $ODDS -eq 9 ]; then ODDS_ARRAY=("${ODDS_CHECK_09[@]}"); fi
if [ $ODDS -eq 10 ]; then ODDS_ARRAY=("${ODDS_CHECK_10[@]}"); fi
FATE_CHART=${ODDS_ARRAY[$(( $CHAOS_FACTOR - 1 ))]}
}
function _raise_chaos () {
if [ $CHAOS_FACTOR -lt 9 ]; then CHAOS_FACTOR=$(( $CHAOS_FACTOR + 1 )); fi
ANSWER="Caos aumentou"
}
function _lower_chaos () {
if [ $CHAOS_FACTOR -gt 1 ]; then CHAOS_FACTOR=$(( $CHAOS_FACTOR - 1 )); fi
ANSWER="Caos diminuiu"
}
function _edit_odds () {
PROP=$1
if [ $PROP -le 10 ] && [ $PROP -ge 0 ]; then ODDS=$PROP; ANSWER="Probabilidade atualizada"; fi
}
function _roll () {
_d100
_determina_probabilidade
EXCEPCIONAL_YES=$(( $FATE_CHART / 5 ))
EXCEPCIONAL_NO=$(( 100 - ( ( 100 - $FATE_CHART ) / 5 ) + 1 ))
if [ $RESULT -gt $FATE_CHART ]; then ANSWER="Não"; fi
if [ $RESULT -le $FATE_CHART ]; then ANSWER="Sim"; fi
if [ $RESULT -le $EXCEPCIONAL_YES ]; then ANSWER="EXCEPCIONAL SIM!"; fi
if [ $RESULT -ge $EXCEPCIONAL_NO ]; then ANSWER="EXCEPCIONAL NÃO!"; fi
if [ $RESULT -eq 11 ] ||
[ $RESULT -eq 22 ] ||
[ $RESULT -eq 33 ] ||
[ $RESULT -eq 44 ] ||
[ $RESULT -eq 55 ] ||
[ $RESULT -eq 66 ] ||
[ $RESULT -eq 77 ] ||
[ $RESULT -eq 88 ] ||
[ $RESULT -eq 99 ]
then
BASE_N=$(echo $RESULT | cut -c1)
if [ $BASE_N -le $CHAOS_FACTOR ]
then
ANSWER="$ANSWER (EVENTO!!!)"
fi
fi
}
function _start_MGME {
_odds_description
echo "C:$CHAOS_FACTOR, P:$ODDS ($ODDS_DESC)"
echo "O que deseja?"
echo ""
read OPT
if [ $OPT = "r" ]; then _roll; fi
if [ $OPT = "c" ]; then _scene; fi
if [ $OPT = "e" ]; then _event; fi
if [ $OPT = "+c" ]; then _raise_chaos; fi
if [ $OPT = "-c" ]; then _lower_chaos; fi
if [ $(echo $OPT | cut -c1) = "p" ]; then _edit_odds $(echo $OPT | cut -c2-3); fi
if [ $OPT = "a" ]; then _ajuda; fi
echo ""
echo "$ANSWER"
#echo ">>> Resultado: $RESULT ($EXCEPCIONAL_YES|$FATE_CHART|$EXCEPCIONAL_NO)"
echo ""
_start_MGME
}
_start_MGME
verificando estado da conexão velox
Regula o horário de uso do computador pelos filhos
Minha solução para monitorar múltiplos termômetros no Slackware
Screensaver Johnny Castaway - XFCE + Wine
Nenhum comentário foi encontrado.
Faça suas próprias atualizações de pacotes/programas no Void Linux e torne-se um Contribuidor
Como rodar o Folding@home no Linux
Criando um painel de controle (Dashboard) para seu servidor com o Homepage
O Abismo entre o Código e o Chão: Saltos Tecnológicos e a Exclusão Estrutural no Brasil
Instalar e Configurar a santíssima trindade (PAP) no Void Linux
Pisando no acelerador do Linux Mint: Kernel XanMod, zRAM e Ajustes de Swap
Como compilar kernel no Linux Mint
Lançamento do Brutal DOOM test 6
Consertando o erro no Brave de webgl
Solução para ter de volta as bordas e barra de títulos das janelas em zenity no Debian 13.x
SystemD e mais polêmicas. (12)
Qual melhor distro para esse notebook? (5)
Novos requisitos de sistema para a versão 26.04 (7)









