File size: 458 Bytes
5c2ed06
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
export const Conditions: import('../../../sim/dex-conditions').ModdedConditionDataTable = {
	invulnerability: {
		// Dig/Fly
		name: 'invulnerability',
		onInvulnerability(target, source, move) {
			if (target === source) return true;
			if ((move.id === 'swift' && target.volatiles['substitute']) || move.id === 'transform') return true;
			this.add('-message', 'The foe ' + target.name + ' can\'t be hit while invulnerable!');
			return false;
		},
	},
};