summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--res/scripts/underwater.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/res/scripts/underwater.lua b/res/scripts/underwater.lua index 660a2d4..cc6d085 100644 --- a/res/scripts/underwater.lua +++ b/res/scripts/underwater.lua
@@ -23,7 +23,7 @@ end
23 23
24function underwater.fish4() 24function underwater.fish4()
25 StartCutscene() 25 StartCutscene()
26 DisplayMessage("* You think it hurt when she unlocked your PSI?\n\fJust picture what it was like for Claus.", "Fish", SpeakerType.BOY) 26 DisplayMessage("* You think it hurt when your PSI unlocked?\n\fJust picture what it was like for Claus.", "Fish", SpeakerType.BOY)
27 WaitForEndOfMessages() 27 WaitForEndOfMessages()
28 HideCutsceneBars() 28 HideCutsceneBars()
29end 29end
@@ -37,7 +37,7 @@ end
37 37
38function underwater.fish6() 38function underwater.fish6()
39 StartCutscene() 39 StartCutscene()
40 DisplayMessage("* Still, I bet you can't wait to get your revenge. You don't fool me.\n\f* You have everyone else fooled but you can't fool yourself.", "Fish", SpeakerType.BOY) 40 DisplayMessage("* Still, you're probably eager to get your revenge. You don't fool me.\n\f* You have everyone else fooled but you can't fool yourself.", "Fish", SpeakerType.BOY)
41 WaitForEndOfMessages() 41 WaitForEndOfMessages()
42 HideCutsceneBars() 42 HideCutsceneBars()
43end 43end
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.fourisland.fourpuzzle.database;

import com.fourisland.fourpuzzle.*;
import com.fourisland.fourpuzzle.gamestate.GameOverGameState;
import java.util.ArrayList;

/**
 *
 * @author hatkirby
 */
public class GameCharacters extends ArrayList<GameCharacter>
{
    private GameCharacters() {}
    
    private static GameCharacters INSTANCE = new GameCharacters();
    static GameCharacters getDefaultParty()
    {
        return INSTANCE;
    }

    static GameCharacters createParty()
    {
        GameCharacters temp = new GameCharacters();
        temp.addAll(INSTANCE);
        
        return temp;
    }

    public GameCharacter getLeader()
    {
        for (GameCharacter chara : this)
        {
            if (chara.isInParty())
            {
                return chara;
            }
        }
        
        Game.setGameState(new GameOverGameState());
        return null;
    } 
    
    public boolean exists(String heroName) {
        for (GameCharacter chara : this)
        {
            if (chara.getName().equals(heroName))
            {
                return true;
            }
        }
        
        return false;
    }

    public GameCharacter get(String heroName) throws NullPointerException {
        for (GameCharacter chara : this)
        {
            if (chara.getName().equals(heroName))
            {
                return chara;
            }
        }
        
        throw new NullPointerException("Could not find character \"" + heroName + "\"");
    }

}