function NewPointData(spellcardnumber,spellcarddifficulty){
	if(GotSpellCardBonus==true){

	SetCommonData("SpellcardsCaptured",GetCommonDataDefault("SpellcardsCaptured",0)+1); // for trump card
	
		if(GetCommonData("SpellcardData")[spellcardnumber]<spellcarddifficulty){

			let oldbonus=0;
			if(GetCommonData("SpellcardData")[spellcardnumber]==1){ oldbonus=1; }
			if(GetCommonData("SpellcardData")[spellcardnumber]==2){ oldbonus=2; }
			if(GetCommonData("SpellcardData")[spellcardnumber]==3){ oldbonus=3; }
			if(GetCommonData("SpellcardData")[spellcardnumber]==4){ oldbonus=5; }
			if(GetCommonData("SpellcardData")[spellcardnumber]==5){ oldbonus=0; }
			if(GetCommonData("SpellcardData")[spellcardnumber]==6){ oldbonus=0; }
			if(GetCommonData("SpellcardData")[spellcardnumber]==7){ oldbonus=0; }

			let bonus=0;
			if(spellcarddifficulty==1){ bonus=1; } //Easy
			if(spellcarddifficulty==2){ bonus=2; } //Normal
			if(spellcarddifficulty==3){ bonus=3; } //Hard
			if(spellcarddifficulty==4){ bonus=5; } //Lunatic
			if(spellcarddifficulty==5){ bonus=4; } //Extra
			if(spellcarddifficulty==6){ bonus=6; } //Nightmare
			if(spellcarddifficulty==7){ bonus=10; } //Trump Card

			SetCommonData("SpellcardPoints",GetCommonDataDefault("SpellcardPoints",0)+(bonus-oldbonus));

			let spellcarddataarray=GetCommonData("SpellcardData");
			spellcarddataarray[spellcardnumber]=spellcarddifficulty;
			SetCommonData("SpellcardData",spellcarddataarray);

			SaveCommonData;
		}
	}
	if(GotSpellCardBonus==false && Continued==false && GetCommonData("InStagePractise")==0){
		if(GetCommonData("SpellcardData")[spellcardnumber]==0){

			let spellcarddataarray=GetCommonData("SpellcardData");
			spellcarddataarray[spellcardnumber]=0.5;
			SetCommonData("SpellcardData",spellcarddataarray);

			SaveCommonData;
		}
	}
SetCommonData("BackToSpellcardPractise",1);
if(spellcards>1 && GetCommonDataDefault("NoAutoItems",0)==0){ SetCommonData("ItemSpawn",1); }
}
