⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cauldron.java

📁 litwizi j2me
💻 JAVA
字号:
class cauldron
{
	private int[] cItem;
	private int numInC;

	public cauldron()
	{
		this.cItem=new int[5];
		cItem[0]=0;
		cItem[1]=0;
		cItem[2]=0;
		cItem[3]=0;
		this.numInC=0;
	}

	// Return a list of what is the cauldron
	public String whatsIn()
	{
		String st;
		items it=new items();

		st="";

		for (int i=0; i<4; i++)
		{
			st+=it.getName(cItem[i]);
			if (i==0 || i==1) st+=", ";
			if (i==2) st+=" & ";
			if (i==3) st+=".";
		}
		return st;
	}

	// Add item to cauldron, return result of spell, if any
	public int addItem(int a)
	{
		int c0, c1, c2, c3;

		// Juggle items
		cItem[0]=cItem[1];
		cItem[1]=cItem[2];
		cItem[2]=cItem[3];
		cItem[3]=a;

		// Assign items to temp int vars
		c0=cItem[0];
		c1=cItem[1];
		c2=cItem[2];
		c3=cItem[3];

		// Glutanium				Glutanium ???
		// (Food +100)
		// Take Poppy(64) &
		// add Rowan(69) &
		// add Datura(68)
		// [P, Ro & (-) = Poison, Food-50]
		if (c1==64)
		{
			if (c2==69)
			{
				if (c3==68)
				{
					return 53;
				}
				else
				{
					return 54;
				}
			}
		}

		// = Extra Health			Sorbum Granus ???
		// (Health +100)
		// Sorbum Granus
		// Take Henbane(60) &
		// add Slippery Elm(61)
		if (c2==60)
		{
			if (c3==61)
			{
				return 110;
			}
		}

		// = Full Health			Treorbum Tanis ???
		// (Health +200)
		// Treorbum
		// Take Henbane(60) &
		//  add Poppy(64) &
		//  add Slippery Elm(61)
		// [H, P & (-) = Create Bat]
		if (c1==60)
		{
			if (c2==64)
			{
				if (c3==61)
				{
					return 111;
				}
			}
		}

		// = Freeze Moving Ent		Fugit Vim 112
		//  Take Fly Agaric(67) &
		//  add Henbane(60)
		// [F, H & (-) = Create Ghost]
		if (c2==67)
		{
			if (c3==60)
			{
				return 112;
			}
		}

		// = Kill Bat				Caldus Divum 113
		// Take Slippery Elm(61) &
		// add Mandrake(63) &
		// add Poppy(64)
		//[S, M & (-) = Create Ghost]
		if (c1==61)
		{
			if (c2==63)
			{
				if (c3==64)
				{
					return 113;
				}
				else
				{
					return 96;
				}
			}
		}

		// = Kill Ghost				Raniam Vim 114
		//  Take Datura(68) &
		//  add Fly Agaric(67) &
		//  add Belladona(62)
		// [D, F & (-) = Create Demon]
		if (c3==62)
		{
			if (c2==67)
			{
				if (c1==68)
				{
					return 114;
				}
				else
				{
					if (c1>0) return 94;
				}
			}
		}

		// = Kill Demon				Beezaltium 115
		// Take Belladona(62) &
		// add Bones(66) &
		// add Rowan(69)
		// [Be, Bo & (-) = Create Devil]
		if (c3==69)
		{
			if (c2==66)
			{
				if (c1==62)
				{
					return 115;
				}
				else
				{
					return 92;
				}
			}
		}

		// = Kill Devil				Ticum Deum 116
		// Take Bones(66) &
		// add Rowan(69) &
		// add Poppy(64)
		// [Bo, Ro & (-) = Create Death]
		if (c3==64)
		{
			if (c2==69)
			{
				if (c1==66)
				{
					return 116;
				}
				else
				{
					return 85;
				}
			}
		}

		// = Kill Death				Popus Lupis 117
		// Take Poppy(64) &
		// add Mandrake(63) &
		// add Slippery Elm(61) &
		// add Henbane(60)
		// [Po, M, S & (-) = Create Death]
		if (c3==60)
		{
			if (c2==61)
			{
				if (c1==63)
				{
					if (c0==64)
					{
						return 117;
					}
					else
					{
						return 85;
					}
				}
			}
		}

		// = Destroy Tree			Natum Tan 118
		// Take Mandrake(63) &
		// add Henbane(60) &
		// add Belladona(62)
		// [M, H & (-) = Create Demon]
		if (c3==62)
		{
			if (c2==60)
			{
				if (c1==63)
				{
					return 118;
				}
				else
				{
					return 94;
				}
			}
		}

		// = Destroy Wall			Frenis Vim 119
		// Take Fly Agaric(67) &
		// add Belladona(62) &
		// add Bones(66)
		// [F, Be & (-) = Create Devil]
		if (c3==66)
		{
			if (c2==62)
			{
				if (c1==67)
				{
					return 119;
				}
				else
				{
					return 92;
				}
			}
		}

		// = Create Black Hole		Voidum 120
		// Take Rowan(69) &
		// add Belladona(62) &
		// add Datura(68) &
		// add Poppy(64)
		// [R, Be, D & (-) = Create Death]
		if (c3==64)
		{
			if (c2==68)
			{
				if (c1==62)
				{
					if (c0==69)
					{
						return 120;
					}
					else
					{
						return 85;
					}
				}
			}
		}

		// = Create Temporal Fix	Asi Tacil 121
		// Take Henbane(60) &
		// add Mandrake(63) &
		// add Psylocybin(65)
		// [H, M & (-) = Create Death]
		if (c3==65)
		{
			if (c2==63)
			{
				if (c1==60)
				{
					return 121;
				}
				else
				{
					return 85;
				}
			}
		}

		// = Create Tree			Fugor Arbum 122
		// Take Psylocybin(65) &
		// add Datura(68) &
		// add Mandrake(63)
		// [Ps, D & (-) = Create Bat]
		if (c3==63)
		{
			if (c2==68)
			{
				if (c1==65)
				{
					return 122;
				}
				else
				{
					return 87;
				}
			}
		}

		// = Create Wall			Ad Argum 123
		// Take Psylocybin(65) &
		// add Fly Agaric(67) &
		// add Bones(66)
		// [Ps, F & (-) = Create Ghost]
		if (c3==66)
		{
			if (c2==67)
			{
				if (c1==65)
				{
					return 123;
				}
				else
				{
					return 96;
				}
			}
		}

		// (Transform into Bat)		Transgildor 124
		// Transgildor
		// Take Datura(68) &
		// add Slippery Elm(61) &
		// add Belladona(62)
		//
		// [D, S & (-) = Create Bat]
		if (c3==62)
		{
			if (c2==61)
			{
				if (c1==68)
				{
					return 124;
				}
			}
		}

		return 0;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -